diff options
author | Luca Matei Pintilie <lucafulger@gmail.com> | 2022-10-25 18:33:00 +0000 |
---|---|---|
committer | Luca Matei Pintilie <lucafulger@gmail.com> | 2022-10-25 18:33:00 +0000 |
commit | b6726af45a1bc244923ff7ab7f6c822e0e4df66a (patch) | |
tree | c6caa9f169ec751ab04d6887a82b56f17a63ed09 /bootstrap.sh | |
parent | 765ad318ba833b744b1e4078abadf8fda11084ea (diff) | |
download | dotfiles-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-x | bootstrap.sh | 14 |
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; |