mirror of
https://github.com/wickedyoda/public-setupfiles.git
synced 2026-11-16 13:31:56 -06:00
updated sync commands
updated sync commands
This commit is contained in:
1 parent
a45afbd3e4
commit
d4cfc5d3cb
3 files changed
+4
-10
No files matched your search
+1
-3
@@ -46,10 +46,8 @@ fi
|
||||
# Check if directory already exists
|
||||
if [ -d "$LOCAL_DIR" ] && [ "$(ls -A "$LOCAL_DIR" 2>/dev/null)" ]; then
|
||||
echo "Existing directory found. Pulling latest changes..."
|
||||
cd "$LOCAL_DIR" || exit 1
|
||||
if ! git pull origin main; then
|
||||
if ! (cd "$LOCAL_DIR" && git pull origin main); then
|
||||
echo "Git pull failed, re-cloning..."
|
||||
cd ..
|
||||
rm -rf "$LOCAL_DIR"
|
||||
git clone "$REMOTE_REPO" "$LOCAL_DIR"
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user