termux-packages/packages/termux-tools/login

23 lines
461 B
Plaintext
Raw Normal View History

2017-02-12 21:01:01 +01:00
#!/data/data/com.termux/files/usr/bin/sh
if [ $# = 0 ] && [ -f $PREFIX/etc/motd ] && [ ! -f ~/.hushlogin ]; then
2017-02-12 21:01:01 +01:00
cat $PREFIX/etc/motd
fi
if [ -G ~/.termux/shell ]; then
SHELL="`realpath ~/.termux/shell`"
else
for file in $PREFIX/bin/bash $PREFIX/bin/sh /system/bin/sh; do
if [ -x $file ]; then
SHELL=$file
break
fi
done
fi
2017-09-17 16:12:20 +02:00
if [ -f $PREFIX/lib/libtermux-exec.so ]; then
export LD_PRELOAD=$PREFIX/lib/libtermux-exec.so
fi
exec "$SHELL" -l "$@"