From 1c2ce6dd101a831066f7ebb10a666a3b3511fd8f Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Sat, 9 Nov 2024 12:48:16 +0700 Subject: [PATCH] fix: update git sync for packages --- setup/git.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setup/git.sh b/setup/git.sh index dc12c80..e81fc78 100644 --- a/setup/git.sh +++ b/setup/git.sh @@ -71,10 +71,11 @@ repo_sync_template() { echo "» Syncing $REPO_NAME repository..." if [ -n "$REPO_PATH" ]; then - cd "$REPO_PATH" || exit + ATTACH_DIR="$REPO_PATH" else - cd "$BLOG_DIR" || exit + ATTACH_DIR="$BLOG_DIR" fi + cd "$ATTACH_DIR" || exit if [ -z "$(ls -A "$REPO_DIR")" ]; then echo " ∟ Cloning $REPO_NAME repository..." @@ -86,7 +87,7 @@ repo_sync_template() { fi else echo " ∟ Pulling $REPO_NAME repository..." - cd "$BLOG_DIR/$REPO_DIR" || exit + cd "$ATTACH_DIR/$REPO_DIR" || exit git checkout main -f git pull