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}"
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}"