mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-25 15:10:28 +00:00
Add diff vdisk <---> src/ functionality to sync.sh
This commit is contained in:
parent
66f29b3f31
commit
b7d5f81b35
1 changed files with 8 additions and 1 deletions
|
@ -44,9 +44,10 @@ DOCS_DIR=
|
||||||
TMPMOUNT=/tmp/zealtmp
|
TMPMOUNT=/tmp/zealtmp
|
||||||
|
|
||||||
print_usage() {
|
print_usage() {
|
||||||
echo "Usage: $0 ( repo | vm ) [OPTION]"
|
echo "Usage: $0 ( repo | vm | diff ) [OPTION]"
|
||||||
echo " repo Overwrites src/ with virtual disk contents."
|
echo " repo Overwrites src/ with virtual disk contents."
|
||||||
echo " vm Overwrites virtual disk with src/ contents."
|
echo " vm Overwrites virtual disk with src/ contents."
|
||||||
|
echo " diff Runs a 'diff' between src/ and virtual disk."
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo " --ignore-dots Ignore dotfiles/dotfolders during synchronize."
|
echo " --ignore-dots Ignore dotfiles/dotfolders during synchronize."
|
||||||
}
|
}
|
||||||
|
@ -73,6 +74,12 @@ else
|
||||||
sudo modprobe nbd
|
sudo modprobe nbd
|
||||||
[ ! -d $TMPMOUNT ] && mkdir $TMPMOUNT
|
[ ! -d $TMPMOUNT ] && mkdir $TMPMOUNT
|
||||||
case $1 in
|
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)
|
repo)
|
||||||
echo "Emptying src..."
|
echo "Emptying src..."
|
||||||
rm -rf ../src/*
|
rm -rf ../src/*
|
||||||
|
|
Loading…
Reference in a new issue