Skip to content

Commit

Permalink
Add diff vdisk <---> src/ functionality to sync.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
GutPuncher committed Aug 22, 2024
1 parent 66f29b3 commit b7d5f81
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion build/sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
Expand All @@ -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/*
Expand Down

0 comments on commit b7d5f81

Please sign in to comment.