From c69e0c82464a3d7a3aa46dc8553d4030cbafe66f Mon Sep 17 00:00:00 2001 From: y4my4my4m <8145020+y4my4my4m@users.noreply.github.com> Date: Thu, 24 Aug 2023 22:22:21 +0900 Subject: [PATCH 1/6] ignore hidden files/folders --- .gitignore | 1 + build/sync.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 127eb5d8..c70a27dc 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ *.o *.d /zealbooter/limine.h +*. \ No newline at end of file diff --git a/build/sync.sh b/build/sync.sh index 54227f8c..6a4d7321 100755 --- a/build/sync.sh +++ b/build/sync.sh @@ -95,7 +95,7 @@ else vm) mount_vdisk echo "Copying src to vdisk..." - sudo cp -r ../src/* $TMPMOUNT + sudo rsync -av --exclude='.*' ../src/ $TMPMOUNT/ umount_vdisk echo "Finished." ;; From 88a138498330d391e655eee52f90a296483b2503 Mon Sep 17 00:00:00 2001 From: y4my4my4m <8145020+y4my4my4m@users.noreply.github.com> Date: Thu, 24 Aug 2023 22:26:08 +0900 Subject: [PATCH 2/6] fix --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c70a27dc..a0b43089 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,4 @@ *.o *.d /zealbooter/limine.h -*. \ No newline at end of file +src/.* \ No newline at end of file From c5fcbe24cf73766e540a6d5f9694913ec29ab57f Mon Sep 17 00:00:00 2001 From: y4my4my4m <8145020+y4my4my4m@users.noreply.github.com> Date: Fri, 25 Aug 2023 16:17:27 +0900 Subject: [PATCH 3/6] use find and cp instead --- build/sync.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/sync.sh b/build/sync.sh index 6a4d7321..f7d828f5 100755 --- a/build/sync.sh +++ b/build/sync.sh @@ -95,7 +95,8 @@ else vm) mount_vdisk echo "Copying src to vdisk..." - sudo rsync -av --exclude='.*' ../src/ $TMPMOUNT/ + cd ../src/ + sudo find . \( ! -path './.*' -and ! -name '.*' \) -and ! -path '*/.*/*' -type f -exec cp --parents {} $TMPMOUNT/ \; umount_vdisk echo "Finished." ;; From 8b1d036e820e79666407e24f84099a67eb72f5df Mon Sep 17 00:00:00 2001 From: y4my4my4m <8145020+y4my4my4m@users.noreply.github.com> Date: Mon, 28 Aug 2023 14:11:23 +0900 Subject: [PATCH 4/6] added --ignore-dots argument --- build/sync.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/build/sync.sh b/build/sync.sh index f7d828f5..d4f39c9e 100755 --- a/build/sync.sh +++ b/build/sync.sh @@ -94,9 +94,17 @@ else ;; vm) mount_vdisk - echo "Copying src to vdisk..." - cd ../src/ - sudo find . \( ! -path './.*' -and ! -name '.*' \) -and ! -path '*/.*/*' -type f -exec cp --parents {} $TMPMOUNT/ \; + case $2 in + --ignore-dots | --dots) + echo "Copying src to vdisk ignoring dotfiles and dotfolders..." + cd ../src/ + sudo find . \( ! -path './.*' -and ! -name '.*' \) -and ! -path '*/.*/*' -type f -exec cp --parents {} $TMPMOUNT/ \; + ;; + *) + echo "Copying entire src to vdisk..." + sudo cp -r ../src/* $TMPMOUNT + ;; + esac umount_vdisk echo "Finished." ;; From 136df9cbc22621c0eaebd0f3f8d457ab7b81d6a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=81=E3=83=A3=E3=83=BC=E3=83=AB=E3=82=BA?= <8145020+y4my4my4m@users.noreply.github.com> Date: Mon, 28 Aug 2023 14:11:59 +0900 Subject: [PATCH 5/6] Update .gitignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index a0b43089..127eb5d8 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,3 @@ *.o *.d /zealbooter/limine.h -src/.* \ No newline at end of file From e35fe7962ccc367379fb31e76c20c0838eb1548c Mon Sep 17 00:00:00 2001 From: Arsenic Blood <127725014+GutPuncher@users.noreply.github.com> Date: Wed, 4 Oct 2023 01:23:43 -0400 Subject: [PATCH 6/6] Update sync.sh --- build/sync.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build/sync.sh b/build/sync.sh index d4f39c9e..152cb605 100755 --- a/build/sync.sh +++ b/build/sync.sh @@ -44,11 +44,11 @@ DOCS_DIR= TMPMOUNT=/tmp/zealtmp print_usage() { - echo "Usage: $0 [ repo | vm ]" - echo - echo " repo - overwrites src/ with virtual disk contents." - echo " vm - overwrites virtual disk with src/ contents." - echo + echo "Usage: $0 ( repo | vm ) [OPTION]" + echo " repo Overwrites src/ with virtual disk contents." + echo " vm Overwrites virtual disk with src/ contents." + echo "Options:" + echo " --ignore-dots Ignore dotfiles/dotfolders during synchronize." } mount_vdisk() {