From 0d399318d5de278da32abb2c38812579bf1ccaff Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Wed, 22 May 2024 07:08:06 +0100 Subject: [PATCH] Re-add pulling emacs config to git-sync-all.sh --- scripts/shell/git-sync-all.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/scripts/shell/git-sync-all.sh b/scripts/shell/git-sync-all.sh index 5e85fb2..22bf92c 100755 --- a/scripts/shell/git-sync-all.sh +++ b/scripts/shell/git-sync-all.sh @@ -1,3 +1,17 @@ +# Clone ~/.emacs.d/ if it doesn't exist, pull otherwise (ff only) +DIRECTORY="$HOME/.emacs.d/" +URL="https://git.xenia.me.uk/pixelifytica/emacs.git" +echo "--- ~/.emacs.d/ ---" +if [ ! -d "$DIRECTORY" ]; then + git clone "$URL" "$DIRECTORY" +fi +( + cd "$DIRECTORY" || exit + git remote set-url origin "$URL" + git pull --ff --ff-only + git status --porcelain +) + # Sync common directories, setting url to ensure it's up-to-date first SYNC_DIRS=( "$HOME/.password-store/"