dotfiles/.local/bin/resync-git-sync

13 lines
275 B
Bash
Executable file

#! /usr/bin/bash
set -euo pipefail
IFS=$'\n\t'
REPO_DIR="$(systemd-path user-state-private)"/git-sync
if [ -d "${REPO_DIR}" ]
then
git -C "${REPO_DIR}" pull
else
cd "$(systemd-path user-state-private)" || exit
git clone https://github.com/simonthum/git-sync
fi