From 10236ec492a44c60135e72d9c215a9eff529606b Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 7 Aug 2017 12:39:06 +0800 Subject: [PATCH] make-stable: Implement a working dry run with nicer output We can not use --link-dest when doing the dryrun as it will consider everything up to date. So create some base args and then add the right parts to it. Skip --checksum from the cli as it makes things really slow. Use rsync (instead of diff -r) as this will be used for the final handling. Keep on using sub dirs as this gives higher control. We could otherwise just syncrhonize everything. --- scripts/make-stable.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/scripts/make-stable.sh b/scripts/make-stable.sh index 5ea5dad..8146e41 100755 --- a/scripts/make-stable.sh +++ b/scripts/make-stable.sh @@ -13,7 +13,9 @@ RELEASE=$2 DRYRUN=$3 if [ "x$DRYRUN" != "x" ]; then - ARGS=--dry-run + BASE_ARGS="--recursive --delete --links --verbose --dry-run " +else + BASE_ARGS="--delete -avH" fi DIRS="images ipk sdk tools cache-state sources cache conf" @@ -26,9 +28,14 @@ do continue fi - echo "Working on $i" - rsync $ARGS --delete -avH \ - --link-dest=$PWD/web-files/$MACHINE/$RELEASE-testing/$i \ + if [ "x$DRYRUN" != "x" ]; then + ARGS="$BASE_ARGS" + else + ARGS="$BASE_ARGS --link-dest=$PWD/web-files/$MACHINE/$RELEASE-testing/$i" + fi + + echo "Checking $i" + rsync $ARGS \ web-files/$MACHINE/$RELEASE-testing/$i/ \ - web-files/$MACHINE/$RELEASE/$i/ + web-files/$MACHINE/$RELEASE/$i/ | egrep -v "sending incre|sent |total" done