aboutsummaryrefslogtreecommitdiff
path: root/bootstrap.sh
diff options
context:
space:
mode:
authorLuca Matei Pintilie <lucafulger@gmail.com>2022-10-25 18:33:00 +0000
committerLuca Matei Pintilie <lucafulger@gmail.com>2022-10-25 18:33:00 +0000
commitb6726af45a1bc244923ff7ab7f6c822e0e4df66a (patch)
treec6caa9f169ec751ab04d6887a82b56f17a63ed09 /bootstrap.sh
parent765ad318ba833b744b1e4078abadf8fda11084ea (diff)
downloaddotfiles-b6726af45a1bc244923ff7ab7f6c822e0e4df66a.tar
dotfiles-b6726af45a1bc244923ff7ab7f6c822e0e4df66a.tar.gz
dotfiles-b6726af45a1bc244923ff7ab7f6c822e0e4df66a.tar.bz2
dotfiles-b6726af45a1bc244923ff7ab7f6c822e0e4df66a.tar.lz
dotfiles-b6726af45a1bc244923ff7ab7f6c822e0e4df66a.tar.xz
dotfiles-b6726af45a1bc244923ff7ab7f6c822e0e4df66a.tar.zst
dotfiles-b6726af45a1bc244923ff7ab7f6c822e0e4df66a.zip
Update neovim, inputrc and bootstrap.sh
Update neovim to use vscode-langservers-extracted Make bootstrap.sh a bit more POSIX compliant
Diffstat (limited to 'bootstrap.sh')
-rwxr-xr-xbootstrap.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/bootstrap.sh b/bootstrap.sh
index 516c407..df2d339 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -1,10 +1,10 @@
#!/usr/bin/env sh
-SYMLINKDIR=$(readlink -f "$0")
-BASEDIR=$(dirname "$SYMLINKDIR")
+SYMLINKDIR="$(readlink -f "$0")"
+BASEDIR="$(dirname "$SYMLINKDIR")"
cd $BASEDIR
-function doIt() {
+doIt() {
git submodule update --init --recursive
rsync --exclude ".git/" \
--exclude ".DS_Store" \
@@ -19,13 +19,15 @@ function doIt() {
-avh --no-perms ./ ~/
}
-if [ "$1" == "--force" -o "$1" == "-f" ]; then
+if [ "$1" = "--force" -o "$1" = "-f" ]; then
doIt;
else
- read -p "This may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1;
+ printf "This may overwrite existing files in your home directory. Are you sure? (y/n) ";
+ read REPLY;
echo "";
- if [[ $REPLY =~ ^[Yy]$ ]]; then
+ if [ "$REPLY" = "y" -o "$REPLY" = "Y" ]; then
doIt;
+ else exit 1;
fi;
fi;