Add -y to options
This commit is contained in:
parent
3e408db313
commit
a0bf9ccf39
@ -6,6 +6,7 @@ SYNC_CUSTOM=0
|
|||||||
SYNC_VIM=0
|
SYNC_VIM=0
|
||||||
VALID_CMD=0
|
VALID_CMD=0
|
||||||
RECLONE=0
|
RECLONE=0
|
||||||
|
YCM=0
|
||||||
TMP_PATH="/tmp/$(uuidgen)"
|
TMP_PATH="/tmp/$(uuidgen)"
|
||||||
mkdir -p "$TMP_PATH"
|
mkdir -p "$TMP_PATH"
|
||||||
sync_config() {
|
sync_config() {
|
||||||
@ -87,8 +88,12 @@ show_help() {
|
|||||||
echo " -s Use this if you want custom stonewareslord settings"
|
echo " -s Use this if you want custom stonewareslord settings"
|
||||||
echo " -c Sync configuration files"
|
echo " -c Sync configuration files"
|
||||||
echo " -r Reclone all git repositories"
|
echo " -r Reclone all git repositories"
|
||||||
|
echo " -y Run youcompleteme.sh"
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
run_ycm() {
|
||||||
|
"$ABSPATH/applications/youcompleteme.sh"
|
||||||
|
}
|
||||||
remove() {
|
remove() {
|
||||||
local SILENT=0
|
local SILENT=0
|
||||||
if [[ "$1" = "-s" ]]; then
|
if [[ "$1" = "-s" ]]; then
|
||||||
@ -102,12 +107,13 @@ remove() {
|
|||||||
\mv -t "$TMP_PATH" $*
|
\mv -t "$TMP_PATH" $*
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
while getopts ":shbcr" OPT "$@"; do
|
while getopts ":shbcyr" OPT "$@"; do
|
||||||
case $OPT in
|
case $OPT in
|
||||||
b) SYNC_VIM=1;VALID_CMD=1;;
|
b) SYNC_VIM=1;VALID_CMD=1;;
|
||||||
s) SYNC_CUSTOM=1;;
|
s) SYNC_CUSTOM=1;;
|
||||||
c) SYNC_CONFIG=1;VALID_CMD=1;;
|
c) SYNC_CONFIG=1;VALID_CMD=1;;
|
||||||
r) RECLONE=1;;
|
r) RECLONE=1;;
|
||||||
|
y) YCM=1;VALID_CMD=1;;
|
||||||
*) echo "Invalid option: $OPT";SHOW_HELP=1;;
|
*) echo "Invalid option: $OPT";SHOW_HELP=1;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@ -124,4 +130,7 @@ fi
|
|||||||
if [[ $SYNC_VIM = 1 ]]; then
|
if [[ $SYNC_VIM = 1 ]]; then
|
||||||
sync_vim
|
sync_vim
|
||||||
fi
|
fi
|
||||||
|
if [[ $YCM = 1 ]]; then
|
||||||
|
run_ycm
|
||||||
|
fi
|
||||||
echo "Done syncing"
|
echo "Done syncing"
|
||||||
|
Loading…
Reference in New Issue
Block a user