From b7d5f81b35ff27aa99e2f9e77311838f34a2a794 Mon Sep 17 00:00:00 2001 From: GutPuncher Date: Wed, 21 Aug 2024 21:18:27 -0400 Subject: [PATCH] Add diff vdisk <---> src/ functionality to sync.sh --- build/sync.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/build/sync.sh b/build/sync.sh index bc10401f..2491f1a6 100755 --- a/build/sync.sh +++ b/build/sync.sh @@ -44,9 +44,10 @@ DOCS_DIR= TMPMOUNT=/tmp/zealtmp print_usage() { - echo "Usage: $0 ( repo | vm ) [OPTION]" + echo "Usage: $0 ( repo | vm | diff ) [OPTION]" echo " repo Overwrites src/ with virtual disk contents." echo " vm Overwrites virtual disk with src/ contents." + echo " diff Runs a 'diff' between src/ and virtual disk." echo "Options:" echo " --ignore-dots Ignore dotfiles/dotfolders during synchronize." } @@ -73,6 +74,12 @@ else sudo modprobe nbd [ ! -d $TMPMOUNT ] && mkdir $TMPMOUNT case $1 in + diff) + mount_vdisk + diff -x *.MAP --color=always -r ../src/ $TMPMOUNT/ | less -R -p "diff -x.*|Only in.*" + umount_vdisk + echo "Finished." + ;; repo) echo "Emptying src..." rm -rf ../src/*