aboutsummaryrefslogtreecommitdiff
path: root/install.sh
diff options
context:
space:
mode:
authorOxbian <oxbian@mailbox.org>2025-09-07 11:34:11 +0200
committerOxbian <oxbian@mailbox.org>2025-09-07 11:34:11 +0200
commitf05d2056c1827fa520658b2244bf4c0991b6f7d7 (patch)
treeb33419b6d9d8d12d2bf8d1678c079d8f1c50d0f4 /install.sh
parenta92789e8707d2a077bc6d3fedfcdf377bc6ceba1 (diff)
downloadvimrc-f05d2056c1827fa520658b2244bf4c0991b6f7d7.tar.gz
vimrc-f05d2056c1827fa520658b2244bf4c0991b6f7d7.zip
feat: no copy with argument in install.shHEADmaster
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh27
1 files changed, 15 insertions, 12 deletions
diff --git a/install.sh b/install.sh
index 5691fc4..2bb99ac 100755
--- a/install.sh
+++ b/install.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env sh
# POSIX script for setting up VIM
-set -euo pipefail
+set -eux
# Variables
script_name="$(basename "${0}")"
@@ -25,17 +25,20 @@ clean_exit() {
trap clean_exit EXIT
-# Ask if user want to copy the project in ~/.vim
-printf "${title}Do you want to copy VIM config in ~/.vim ? [N/y]${reset}\n"
-read -r choice
-case "$choice" in
- y|Y)
- cp -r . ~/.vim
- printf "${green}%s${reset}\n" "VIM config copied in ~/.vim"
- ;;
- *)
- ;;
-esac
+# Ask if user want to copy the project in ~/.vim, can be skipped by adding
+# ./install.sh any_argument_you_want
+if [ "$#" -eq 0 ]; then
+ printf "${title}Do you want to copy VIM config in ~/.vim ? [N/y]${reset}\n"
+ read -r choice
+ case "$choice" in
+ y|Y)
+ cp -r . ~/.vim
+ printf "${green}%s${reset}\n" "VIM config copied in ~/.vim"
+ ;;
+ *)
+ ;;
+ esac
+fi
sed -i s#\.config\/vim#\.vim## ~/.vim/conf/plugins.vim
sed -i s#\.config\/vim#\.vim## ~/.vim/vimrc
ArKa projects. All rights to me, and your next child right arm.