1
0
Fork 0

fix install script

This commit is contained in:
Massaki Archambault 2018-03-10 13:07:17 -05:00
parent 1d1ec88edb
commit 894b011bb1
2 changed files with 14 additions and 8 deletions

View File

@ -14,9 +14,10 @@ USAGE
OPTIONS OPTIONS
-h, --help Display this help message. -h, --help Display this help message.
-y --yes Skip confirmations.
--symlink Symlink the files. This is the default behavior. --symlink Symlink the files. This is the default behavior.
--copy Copy the files. --copy Copy the files.
--noscript Skip the post-install script --noscript Skip the pre-install and the post-install scripts
EOF EOF
} }
@ -99,11 +100,6 @@ make_link() {
fi fi
} }
post_install() {
# install vim plugins
vim -E +"call dein#update()" +"qall!" /dev/null &>/dev/null
}
short_args=hy short_args=hy
long_args=help,yes,symlink,copy,noscript long_args=help,yes,symlink,copy,noscript
@ -154,6 +150,11 @@ fi
pushd "${0%/*}" >/dev/null pushd "${0%/*}" >/dev/null
if [[ -f "./scripts/pre-install.sh" && -z "$OPT_NOSCRIPT" ]]; then
log "*" "Running pre-install"
bash ./scripts/pre-install.sh
fi
for file_source in "files"; do for file_source in "files"; do
log "*" "Processing $file_source" log "*" "Processing $file_source"
for file_path in $(get_path "$file_source"); do for file_path in $(get_path "$file_source"); do
@ -161,9 +162,9 @@ for file_source in "files"; do
done done
done done
if [[ -z "$OPT_NOSCRIPT" ]]; then if [[ -f "./scripts/post-install.sh" && -z "$OPT_NOSCRIPT" ]]; then
log "*" "Running post-install" log "*" "Running post-install"
post_install bash ./scripts/post-install.sh
fi fi
popd >/dev/null popd >/dev/null

5
scripts/post-install.sh Normal file
View File

@ -0,0 +1,5 @@
#!/bin/bash
# install vim plugins
vim -E +"call dein#update()" +"qall!" /dev/null &>/dev/null