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"