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/*