From 6fb403a091c3cefc7e716602660c3c35717168cf Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Tue, 28 Nov 2017 00:34:11 -0500 Subject: [PATCH] Minor updates --- scripts/sync.sh | 1 + shells/zshrc | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/scripts/sync.sh b/scripts/sync.sh index aedfc9a..9aee3ac 100755 --- a/scripts/sync.sh +++ b/scripts/sync.sh @@ -94,6 +94,7 @@ remove() { if [[ "$1" = "-s" ]]; then # Be quiet! SILENT=1 + shift fi if [[ $SILENT = 1 ]]; then \mv -t "$TMP_PATH" $* 2>/dev/null diff --git a/shells/zshrc b/shells/zshrc index e41024f..3864793 100644 --- a/shells/zshrc +++ b/shells/zshrc @@ -89,6 +89,15 @@ dsl() { shift done } +# Update the sync project +update-sync-project() { + if [[ ! -L ~/.zshrc ]]; then + echo "zshrc isn't a link" + return 1 + fi + local ABSPATH="$(\dirname "$(\dirname "$(\readlink -e ~/.zshrc)")")" + git -C "$ABSPATH" pull origin master +} # Remove directory by removing subdirectories up a level dedir(){ # Try removing the directory if it's empty, fail silently if you can't