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
fd4571d1
Commit
fd4571d1
authored
Sep 08, 2019
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
installer: allow chsh to work in termux
parent
f9e133b8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
17 deletions
+25
-17
install.sh
tools/install.sh
+25
-17
No files found.
tools/install.sh
View file @
fd4571d1
...
@@ -165,6 +165,13 @@ setup_shell() {
...
@@ -165,6 +165,13 @@ setup_shell() {
*
)
echo
"Invalid choice. Shell change skipped."
;
return
;;
*
)
echo
"Invalid choice. Shell change skipped."
;
return
;;
esac
esac
# Check if we're running on Termux
case
"
$PREFIX
"
in
*
com.termux
*
)
termux
=
true
;
zsh
=
zsh
;;
*
)
termux
=
false
;;
esac
if
[
"
$termux
"
!=
true
]
;
then
# Test for the right location of the "shells" file
# Test for the right location of the "shells" file
if
[
-f
/etc/shells
]
;
then
if
[
-f
/etc/shells
]
;
then
shells_file
=
/etc/shells
shells_file
=
/etc/shells
...
@@ -185,9 +192,10 @@ setup_shell() {
...
@@ -185,9 +192,10 @@ setup_shell() {
return
return
fi
fi
fi
fi
fi
# We're going to change the default shell, so back up the current one
# We're going to change the default shell, so back up the current one
if
[
-n
$SHELL
]
;
then
if
[
-n
"
$SHELL
"
]
;
then
echo
$SHELL
>
~/.shell.pre-oh-my-zsh
echo
$SHELL
>
~/.shell.pre-oh-my-zsh
else
else
grep
"^
$USER
:"
/etc/passwd |
awk
-F
:
'{print $7}'
>
~/.shell.pre-oh-my-zsh
grep
"^
$USER
:"
/etc/passwd |
awk
-F
:
'{print $7}'
>
~/.shell.pre-oh-my-zsh
...
...
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