Skip to content

Commit

Permalink
fix: update git sync for packages
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhongit committed Nov 9, 2024
1 parent 33b771c commit 1c2ce6d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions setup/git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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..."
Expand All @@ -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
Expand Down

0 comments on commit 1c2ce6d

Please sign in to comment.