]> git.bochard.net Git - mysite.git/commitdiff
fix errors in sync-works.sh
authorbochard <mail@bochard.net>
Sun, 6 Jul 2025 12:10:52 +0000 (20:10 +0800)
committerbochard <mail@bochard.net>
Sun, 6 Jul 2025 12:10:52 +0000 (20:10 +0800)
sync-works.sh
works-tmp/atm-program-in-c [deleted submodule]
works-tmp/basic-calc [deleted submodule]
works-tmp/circle [deleted submodule]
works-tmp/drum-ka-dum [deleted submodule]
works-tmp/number-guessing-game-in-c [deleted submodule]
works-tmp/rock-paper-scissors-in-c [deleted submodule]
works-tmp/signup-login-system [deleted submodule]
works-tmp/simple-cash-register [deleted submodule]
works-tmp/tick-clock [deleted submodule]

index 9788ecf648aa3a5bc59092f230fcac7230984e87..435d85523a2051268c967cde9d149b729d4842d5 100755 (executable)
@@ -20,8 +20,8 @@ mkdir -p "$tmpBase" "$worksBase"
 
 echo -e "${BLUE}Checking and adding missing submodules in $tmpBase...${NC}"
 for work in "${!works[@]}"; do
-  tmpPath="$tmpBase/$works"
-  destPath="$worksBase/$works"
+  tmpPath="$tmpBase/$work"
+  destPath="$worksBase/$work"
 
   if [ ! -d "$tmpPath" ]; then
     echo -e "${BLUE}Adding submodule $work to $tmpBase...${NC}"
@@ -55,7 +55,7 @@ git add "$worksBase/"
 echo -e "${GREEN}Changes staged.${NC}"
 
 echo -e "${BLUE}Committing changes...${NC}"
-if git commit -m "Sync latest updates from submodules to works/ directory."
+if git commit -m "Sync latest updates from submodules to works/ directory."; then
   echo -e "${GREEN}Changes committed.${NC}"
 else
   echo -e "${RED}Nothing to commit.${NC}"
diff --git a/works-tmp/atm-program-in-c b/works-tmp/atm-program-in-c
deleted file mode 160000 (submodule)
index 983ba96..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 983ba96084d0545ca97a9819a339a61783825ff1
diff --git a/works-tmp/basic-calc b/works-tmp/basic-calc
deleted file mode 160000 (submodule)
index 493c6df..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 493c6df4598459fdacb4f7b909cc49f956343ffe
diff --git a/works-tmp/circle b/works-tmp/circle
deleted file mode 160000 (submodule)
index 23fce73..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 23fce733bde40bca8a18256f803b26415bd71fbc
diff --git a/works-tmp/drum-ka-dum b/works-tmp/drum-ka-dum
deleted file mode 160000 (submodule)
index e0d75ce..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit e0d75ced202fb755ef5fd5f7bdd74dc1c45e2b3e
diff --git a/works-tmp/number-guessing-game-in-c b/works-tmp/number-guessing-game-in-c
deleted file mode 160000 (submodule)
index d92cfaf..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit d92cfaf60e0df57e6677e35178fee74d23796e37
diff --git a/works-tmp/rock-paper-scissors-in-c b/works-tmp/rock-paper-scissors-in-c
deleted file mode 160000 (submodule)
index c6663b5..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit c6663b51defac60e42056e076902b7f6aa68eeb3
diff --git a/works-tmp/signup-login-system b/works-tmp/signup-login-system
deleted file mode 160000 (submodule)
index 2c4be24..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 2c4be24e0e0a5348f27d513d01bf96aa4eeb7bb8
diff --git a/works-tmp/simple-cash-register b/works-tmp/simple-cash-register
deleted file mode 160000 (submodule)
index e2467d7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit e2467d7d864c2488034bcadafed2b5e5f1dea0a8
diff --git a/works-tmp/tick-clock b/works-tmp/tick-clock
deleted file mode 160000 (submodule)
index f036de0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit f036de0d503a137984769ff9c7749c5ef7fb004e