termux-tools: Handle invalid login in chsh
This commit is contained in:
parent
83686ac5af
commit
2d36166493
@ -8,6 +8,10 @@ show_usage () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set_shell () {
|
set_shell () {
|
||||||
|
if [ "$1" = login ]; then
|
||||||
|
echo "login is not a valid shell"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
mkdir -p $HOME/.termux
|
mkdir -p $HOME/.termux
|
||||||
NEW_SHELL=$PREFIX/bin/$1
|
NEW_SHELL=$PREFIX/bin/$1
|
||||||
if test -x $NEW_SHELL -a ! -d $NEW_SHELL; then
|
if test -x $NEW_SHELL -a ! -d $NEW_SHELL; then
|
||||||
|
Loading…
Reference in New Issue
Block a user