termux-tools: Handle invalid login in chsh

This commit is contained in:
Fredrik Fornwall 2017-02-28 00:30:06 +01:00
parent 83686ac5af
commit 2d36166493
1 changed files with 4 additions and 0 deletions

View File

@ -8,6 +8,10 @@ show_usage () {
}
set_shell () {
if [ "$1" = login ]; then
echo "login is not a valid shell"
exit 1
fi
mkdir -p $HOME/.termux
NEW_SHELL=$PREFIX/bin/$1
if test -x $NEW_SHELL -a ! -d $NEW_SHELL; then