From: Stephen Rothwell Date: Thu, 14 Sep 2023 22:36:27 +0000 (+1000) Subject: backup_next: update to remove qult and mmotm X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=3313f4d9a7722b71d1f0f46d806bd3c550c39a25;p=next-scripts backup_next: update to remove qult and mmotm also cd to the top directory --- diff --git a/backup_next b/backup_next index 70abf7f..e035be3 100755 --- a/backup_next +++ b/backup_next @@ -3,9 +3,14 @@ host="fs" [ "$1" ] && host="$1" -rsync -avHP --exclude gitk.cache --exclude next-2'*'/ \ - --include mmotm/.git --include mmotm/.git/'**' --exclude mmotm/'**' \ - --include next/.git --include next/.git/'**' --exclude next/'**' \ - --include quilt/.git --include quilt/.git/'**' --exclude quilt/'**' \ - --include next-fixes/.git --include next-fixes/.git/'**' --exclude next-fixes/'**' \ - --delete --delete-excluded next/ "$host":next/ +BASE=$HOME/kernels/next + +if ! cd ~/kernels/next; then + printf '%s: cannot chdir to base dir "%s"\n' "$0" "$BASE" + exit 1 +fi + +rsync -avHP --exclude gitk.cache --exclude /next-2'*'/ \ + --include /next/.git --include /next/.git/'**' --exclude /next/'**' \ + --include /next-fixes/.git --include /next-fixes/.git/'**' --exclude /next-fixes/'**' \ + --delete --delete-excluded . "$host":next/.