Only try to sync repos that exist. Would sync the PWD otherwise

This commit is contained in:
Nemo 2020-05-16 00:56:21 +05:30
parent 7a426b9877
commit 3d27656b6b
1 changed files with 8 additions and 6 deletions

View File

@ -3,11 +3,13 @@
PATH=$PATH:/home/nemo/projects/scripts/
function sync_repo() {
pushd $1
git config --bool branch.master.sync true
git config --bool branch.master.syncNewFiles true
git-sync
popd
if [[ -d "$1" ]]; then
pushd $1
git config --bool branch.master.sync true
git config --bool branch.master.syncNewFiles true
git-sync
popd
fi
}
# xpad-notes
@ -24,4 +26,4 @@ sync_repo /home/nemo/projects/personal/mobile-passwords
# scripts?: NO
# imapfilter: YES
# /etc: YES
# dotfiles: NO
# dotfiles: NO