|
|
|
|
@ -165,6 +165,13 @@ setup_shell() { |
|
|
|
|
*) echo "Invalid choice. Shell change skipped."; return ;; |
|
|
|
|
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 |
|
|
|
|
if [ -f /etc/shells ]; then |
|
|
|
|
shells_file=/etc/shells |
|
|
|
|
@ -185,9 +192,10 @@ setup_shell() { |
|
|
|
|
return |
|
|
|
|
fi |
|
|
|
|
fi |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
# 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 |
|
|
|
|
else |
|
|
|
|
grep "^$USER:" /etc/passwd | awk -F: '{print $7}' > ~/.shell.pre-oh-my-zsh |
|
|
|
|
|