Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
b931d6a9
Commit
b931d6a9
authored
May 28, 2019
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
installer: change to --unattended argument and add docs
parent
065844fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
install.sh
tools/install.sh
+10
-1
No files found.
tools/install.sh
View file @
b931d6a9
...
@@ -12,15 +12,23 @@
...
@@ -12,15 +12,23 @@
# You can tweak the install behavior by setting variables when running the script. For
# 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:
# example, to change the path to the Oh My Zsh repository:
# ZSH=~/.zsh sh install.sh
# ZSH=~/.zsh sh install.sh
#
# Respects the following environment variables:
# Respects the following environment variables:
# ZSH - path to the Oh My Zsh repository folder (default: $HOME/.oh-my-zsh)
# 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)
# 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)
# REMOTE - full remote URL of the git repo to install (default: GitHub via HTTPS)
# BRANCH - branch to check out immediately after install (default: master)
# BRANCH - branch to check out immediately after install (default: master)
#
# Other options:
# Other options:
# CHSH - 'no' means the installer will not change the default shell (default: yes)
# 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)
# 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
set
-e
# Default settings
# Default settings
...
@@ -178,6 +186,7 @@ setup_shell() {
...
@@ -178,6 +186,7 @@ setup_shell() {
}
}
main
()
{
main
()
{
# Run as unattended if stdin is closed
if
[
!
-t
0
]
;
then
if
[
!
-t
0
]
;
then
RUNZSH
=
no
RUNZSH
=
no
CHSH
=
no
CHSH
=
no
...
@@ -186,7 +195,7 @@ main() {
...
@@ -186,7 +195,7 @@ main() {
# Parse arguments
# Parse arguments
while
[
$#
-gt
0
]
;
do
while
[
$#
-gt
0
]
;
do
case
$1
in
case
$1
in
--
silent
|
--batch
)
RUNZSH
=
no
;
CHSH
=
no
;;
--
unattended
)
RUNZSH
=
no
;
CHSH
=
no
;;
--skip-chsh
)
CHSH
=
no
;;
--skip-chsh
)
CHSH
=
no
;;
esac
esac
shift
shift
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment