|
@@ -10,9 +10,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
set -e
|
|
set -e
|
|
|
|
|
|
@@ -22,6 +25,10 @@ REPO=${REPO:-robbyrussell/oh-my-zsh}
|
|
REMOTE=${REMOTE:-https://github.com/${REPO}.git}
|
|
REMOTE=${REMOTE:-https://github.com/${REPO}.git}
|
|
BRANCH=${BRANCH:-master}
|
|
BRANCH=${BRANCH:-master}
|
|
|
|
|
|
|
|
+
|
|
|
|
+CHSH=${CHSH:-yes}
|
|
|
|
+
|
|
|
|
+
|
|
command_exists() {
|
|
command_exists() {
|
|
command -v "$@" >/dev/null 2>&1
|
|
command -v "$@" >/dev/null 2>&1
|
|
}
|
|
}
|
|
@@ -118,6 +125,11 @@ export ZSH=\"$ZSH\"
|
|
}
|
|
}
|
|
|
|
|
|
setup_shell() {
|
|
setup_shell() {
|
|
|
|
+
|
|
|
|
+ if [ $CHSH = no ] || ! [ -t 0 ]; then
|
|
|
|
+ return
|
|
|
|
+ fi
|
|
|
|
+
|
|
|
|
|
|
if [ "$(basename "$SHELL")" = "zsh" ]; then
|
|
if [ "$(basename "$SHELL")" = "zsh" ]; then
|
|
return
|
|
return
|
|
@@ -161,6 +173,14 @@ setup_shell() {
|
|
}
|
|
}
|
|
|
|
|
|
main() {
|
|
main() {
|
|
|
|
+
|
|
|
|
+ while [ $# -gt 0 ]; do
|
|
|
|
+ case $1 in
|
|
|
|
+ --skip-chsh) CHSH=no ;;
|
|
|
|
+ esac
|
|
|
|
+ shift
|
|
|
|
+ done
|
|
|
|
+
|
|
setup_color
|
|
setup_color
|
|
|
|
|
|
if ! command_exists zsh; then
|
|
if ! command_exists zsh; then
|
|
@@ -202,4 +222,4 @@ main() {
|
|
exec zsh -l
|
|
exec zsh -l
|
|
}
|
|
}
|
|
|
|
|
|
-main
|
|
+main "$@"
|