diff options
author | Marc Cornellà <marc.cornella@live.com> | 2019-05-28 17:34:05 +0200 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2019-06-03 17:18:25 +0200 |
commit | b931d6a9dbab9e507179ae405455e443102fcc28 (patch) | |
tree | afa5e1f45fb3543a0cde40fd95ff8ab0e61e7252 /tools/install.sh | |
parent | 065844fdc058360a66320f9d0e6a04fc12853a05 (diff) | |
download | zsh-b931d6a9dbab9e507179ae405455e443102fcc28.tar.gz zsh-b931d6a9dbab9e507179ae405455e443102fcc28.tar.bz2 zsh-b931d6a9dbab9e507179ae405455e443102fcc28.zip |
installer: change to --unattended argument and add docs
Diffstat (limited to 'tools/install.sh')
-rwxr-xr-x | tools/install.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/install.sh b/tools/install.sh index 05b485333..8763b3513 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -12,15 +12,23 @@ # You can tweak the install behavior by setting variables when running the script. For # example, to change the path to the Oh My Zsh repository: # ZSH=~/.zsh sh install.sh +# # Respects the following environment variables: # ZSH - path to the Oh My Zsh repository folder (default: $HOME/.oh-my-zsh) # REPO - name of the GitHub repo to install from (default: robbyrussell/oh-my-zsh) # REMOTE - full remote URL of the git repo to install (default: GitHub via HTTPS) # BRANCH - branch to check out immediately after install (default: master) +# # Other options: # CHSH - 'no' means the installer will not change the default shell (default: yes) # RUNZSH - 'no' means the installer will not run zsh after the install (default: yes) # +# You can also pass some arguments to the install script to set some these options: +# --skip-chsh: has the same behavior as setting CHSH to 'no' +# --unattended: sets both CHSH and RUNZSH to 'no' +# For example: +# sh install.sh --unattended +# set -e # Default settings @@ -178,6 +186,7 @@ setup_shell() { } main() { + # Run as unattended if stdin is closed if [ ! -t 0 ]; then RUNZSH=no CHSH=no @@ -186,7 +195,7 @@ main() { # Parse arguments while [ $# -gt 0 ]; do case $1 in - --silent|--batch) RUNZSH=no; CHSH=no ;; + --unattended) RUNZSH=no; CHSH=no ;; --skip-chsh) CHSH=no ;; esac shift |