2024-02-14 08:34:30 +00:00
|
|
|
SYNC_DIRS=(
|
|
|
|
"$HOME/.password-store/"
|
|
|
|
"$HOME/Documents/Org/"
|
|
|
|
"$HOME/Documents/References/"
|
|
|
|
)
|
|
|
|
SYNC_URLS=(
|
|
|
|
"https://git.xenia.me.uk/xenia/pass.git"
|
|
|
|
"https://git.xenia.me.uk/xenia/org.git"
|
|
|
|
"https://git.xenia.me.uk/xenia/references.git"
|
|
|
|
)
|
2024-02-01 11:35:41 +00:00
|
|
|
|
2024-02-14 08:34:30 +00:00
|
|
|
for i in "${!SYNC_DIRS[@]}"; do
|
|
|
|
DIRECTORY="${SYNC_DIRS[$i]}"
|
|
|
|
URL="${SYNC_URLS[$i]}"
|
2024-02-01 11:35:41 +00:00
|
|
|
echo "--- $DIRECTORY ---"
|
2024-02-14 08:34:30 +00:00
|
|
|
if [ ! -d "$DIRECTORY" ]; then
|
|
|
|
git clone "$URL" "$DIRECTORY"
|
|
|
|
fi
|
2024-02-05 06:22:44 +00:00
|
|
|
(
|
|
|
|
cd "$DIRECTORY" || exit
|
2024-02-14 08:34:30 +00:00
|
|
|
git remote set-url origin "$URL"
|
2024-02-05 06:22:44 +00:00
|
|
|
git-sync -ns
|
|
|
|
)
|
2024-01-14 14:38:22 +00:00
|
|
|
done
|