Evie Litherland-Smith
b2f0f3e08d
Add elfeed directory back now that I'm ignoring the db entries properly Add urls for repositories so that script can clone them if the directory doesn't already exist, and ensure correct remote url is set before syncing
27 lines
640 B
Bash
Executable file
27 lines
640 B
Bash
Executable file
SYNC_DIRS=(
|
|
"$HOME/.password-store/"
|
|
"$HOME/.elfeed/"
|
|
"$HOME/Documents/Org/"
|
|
"$HOME/Documents/References/"
|
|
)
|
|
SYNC_URLS=(
|
|
"https://git.xenia.me.uk/xenia/pass.git"
|
|
"https://git.xenia.me.uk/xenia/elfeed.git"
|
|
"https://git.xenia.me.uk/xenia/org.git"
|
|
"https://git.xenia.me.uk/xenia/references.git"
|
|
)
|
|
|
|
for i in "${!SYNC_DIRS[@]}"; do
|
|
DIRECTORY="${SYNC_DIRS[$i]}"
|
|
URL="${SYNC_URLS[$i]}"
|
|
echo "--- $DIRECTORY ---"
|
|
if [ ! -d "$DIRECTORY" ]; then
|
|
git clone "$URL" "$DIRECTORY"
|
|
fi
|
|
(
|
|
cd "$DIRECTORY" || exit
|
|
git remote set-url origin "$URL"
|
|
git-sync -ns
|
|
)
|
|
done
|