diff options
author | Luca Matei Pintilie <lucafulger@gmail.com> | 2023-01-18 20:24:34 +0000 |
---|---|---|
committer | Luca Matei Pintilie <lucafulger@gmail.com> | 2023-01-18 20:24:34 +0000 |
commit | ed903f6ba027d3b40f4b9cbdccb6fc2ad6673e9c (patch) | |
tree | 1b73a36c9c57f9fcc650358081c17f0be5f78c20 /bootstrap.sh | |
parent | 10b49adb9849f38ebcb2aaa96c2e16c279d1359b (diff) | |
download | dotfiles-ed903f6ba027d3b40f4b9cbdccb6fc2ad6673e9c.tar dotfiles-ed903f6ba027d3b40f4b9cbdccb6fc2ad6673e9c.tar.gz dotfiles-ed903f6ba027d3b40f4b9cbdccb6fc2ad6673e9c.tar.bz2 dotfiles-ed903f6ba027d3b40f4b9cbdccb6fc2ad6673e9c.tar.lz dotfiles-ed903f6ba027d3b40f4b9cbdccb6fc2ad6673e9c.tar.xz dotfiles-ed903f6ba027d3b40f4b9cbdccb6fc2ad6673e9c.tar.zst dotfiles-ed903f6ba027d3b40f4b9cbdccb6fc2ad6673e9c.zip |
Better shell scripts
Diffstat (limited to 'bootstrap.sh')
-rwxr-xr-x | bootstrap.sh | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/bootstrap.sh b/bootstrap.sh index df2d339..7127570 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -19,17 +19,19 @@ doIt() { -avh --no-perms ./ ~/ } -if [ "$1" = "--force" -o "$1" = "-f" ]; then +if [ "$1" = "--force" ] || [ "$1" = "-f" ] +then doIt; else - printf "This may overwrite existing files in your home directory. Are you sure? (y/n) "; - read REPLY; - echo ""; - if [ "$REPLY" = "y" -o "$REPLY" = "Y" ]; then - doIt; - else exit 1; - fi; -fi; + printf "This may overwrite existing files in your home directory. Are you sure? (y/n) " + read REPLY + echo "" + if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] + then + doIt + else exit 1 + fi +fi -unset doIt; +unset doIt |