diff options
author | Tucker Evans <tuckerevans24@gmail.com> | 2018-05-12 12:45:55 -0400 |
---|---|---|
committer | Tucker Evans <tuckerevans24@gmail.com> | 2018-05-12 12:45:55 -0400 |
commit | 37a3cb0fdb8fe871bb24cdb5e328fa00e1155b3f (patch) | |
tree | 4956739135b25eb887b3d7bcb1273d8c9872a126 /src | |
parent | 461b0e8969b89ea37cc78867f333494b1d0e5de2 (diff) |
-l flag changes logfile (file with output of internal commands from
/tmp/PLUGVIM-date.log to .plug/date.log
Diffstat (limited to 'src')
-rwxr-xr-x | src/plug.sh | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/plug.sh b/src/plug.sh index ab022bc..1a95764 100755 --- a/src/plug.sh +++ b/src/plug.sh @@ -33,7 +33,7 @@ fi PLUG_PATH=".vim/pack/$USER/start/" VIM_PATH="vim" JOBS=4 -LOG_FILE=~/.plug/$(date -Is).log +LOG_FILE=/tmp/PLUGVIM-$(date -Is).log GIT_DIR="$HOME/dotfiles" PROGRAM="plug" touch $LOG_FILE @@ -84,7 +84,7 @@ cmd_usage () { } cmd_install() { - while getopts ":ocg:d:" opt; + while getopts ":ocg:d:l" opt; do case $opt in o) @@ -99,6 +99,9 @@ cmd_install() { d) VIM_PATH=$OPTARG ;; + l) + LOG_FILE=~/.plug/$(date -Is).log + ;; \?) echo "Invalid option: -$OPTARG" >&2 return @@ -135,7 +138,7 @@ cmd_install() { } cmd_update() { - while getopts ":jc" opt; + while getopts ":jcl" opt; do case $opt in c) @@ -144,6 +147,9 @@ cmd_update() { j) JOBS=$OPTARG ;; + l) + LOG_FILE=~/.plug/$(date -Is).log + ;; \?) echo "Invalid option: -$OPTARG" >&2 return @@ -173,7 +179,7 @@ cmd_update() { } cmd_remove() { - while getopts ":ocd:g:" opt; + while getopts ":ocd:g:l" opt; do case $opt in o) @@ -188,6 +194,9 @@ cmd_remove() { d) VIM_PATH=$OPTARG ;; + l) + LOG_FILE=~/.plug/$(date -Is).log + ;; \?) echo "Invalid option: -$OPTARG" >&2 return @@ -224,12 +233,15 @@ cmd_remove() { } cmd_list() { - while getopts ":ocg:" opt; + while getopts ":ocg:l" opt; do case $opt in g) GIT_DIR=$OPTARG ;; + l) + LOG_FILE=~/.plug/$(date -Is).log + ;; \?) echo "Invalid option: -$OPTARG" >&2 return |