Add pull step back to git-sync-all.sh

Pulls ~/.emacs.d/ and ~/.config/home-manager/
This commit is contained in:
Evie Litherland-Smith 2024-06-07 06:01:43 +01:00
parent fd35f72cd2
commit 0e45bbe456

View file

@ -1,7 +1,17 @@
# Clone ~/.emacs.d/ if it doesn't exist, pull otherwise (ff only) # Clone ~/.emacs.d/ and ~/.config/home-manager if then don't exist,
DIRECTORY="$HOME/.emacs.d/" # pull otherwise (ff only)
URL="https://git.xenia.me.uk/pixelifytica/emacs.git" PULL_DIRS=(
echo "--- ~/.emacs.d/ ---" "$HOME/.emacs.d/"
"${XDG_CONFIG_HOME:-$HOME/.config}/home-manager"
)
PULL_URLS=(
"https://git.xenia.me.uk/pixelifytica/emacs.git"
"https://git.xenia.me.uk/pixelifytica/home-manager.git"
)
for i in "${!PULL_DIRS[@]}"; do
DIRECTORY="${PULL_DIRS[$i]}"
URL="${PULL_URLS[$i]}"
echo "--- $DIRECTORY ---"
if [ ! -d "$DIRECTORY" ]; then if [ ! -d "$DIRECTORY" ]; then
git clone "$URL" "$DIRECTORY" git clone "$URL" "$DIRECTORY"
fi fi
@ -11,6 +21,7 @@ fi
git pull --ff --ff-only git pull --ff --ff-only
git status --porcelain git status --porcelain
) )
done
# Sync common directories, setting url to ensure it's up-to-date first # Sync common directories, setting url to ensure it's up-to-date first
SYNC_DIRS=( SYNC_DIRS=(