From 3313f4d9a7722b71d1f0f46d806bd3c550c39a25 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Fri, 15 Sep 2023 08:36:27 +1000 Subject: [PATCH] backup_next: update to remove qult and mmotm also cd to the top directory --- backup_next | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) 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/. -- 2.39.5