From a0bf9ccf39dbcdbfc5156b65538558a15316bdac Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Tue, 28 Nov 2017 16:38:01 -0500 Subject: [PATCH] Add -y to options --- scripts/sync.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/sync.sh b/scripts/sync.sh index 48d5cf2..50dc9d4 100755 --- a/scripts/sync.sh +++ b/scripts/sync.sh @@ -6,6 +6,7 @@ SYNC_CUSTOM=0 SYNC_VIM=0 VALID_CMD=0 RECLONE=0 +YCM=0 TMP_PATH="/tmp/$(uuidgen)" mkdir -p "$TMP_PATH" sync_config() { @@ -87,8 +88,12 @@ show_help() { echo " -s Use this if you want custom stonewareslord settings" echo " -c Sync configuration files" echo " -r Reclone all git repositories" + echo " -y Run youcompleteme.sh" exit } +run_ycm() { + "$ABSPATH/applications/youcompleteme.sh" +} remove() { local SILENT=0 if [[ "$1" = "-s" ]]; then @@ -102,12 +107,13 @@ remove() { \mv -t "$TMP_PATH" $* fi } -while getopts ":shbcr" OPT "$@"; do +while getopts ":shbcyr" OPT "$@"; do case $OPT in b) SYNC_VIM=1;VALID_CMD=1;; s) SYNC_CUSTOM=1;; c) SYNC_CONFIG=1;VALID_CMD=1;; r) RECLONE=1;; + y) YCM=1;VALID_CMD=1;; *) echo "Invalid option: $OPT";SHOW_HELP=1;; esac done @@ -124,4 +130,7 @@ fi if [[ $SYNC_VIM = 1 ]]; then sync_vim fi +if [[ $YCM = 1 ]]; then + run_ycm +fi echo "Done syncing"