nutools/lib/ulib/bash

14 lines
455 B
Plaintext
Raw Normal View History

2013-08-27 15:14:44 +04:00
##@cooked comments # -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
## Relancer le script avec bash si nécessaire
##@cooked nocomments
if [ `basename "${BASH:-sh}"` = "sh" ]; then
bash=`which bash 2>/dev/null`
for bash in "$bash" /bin/bash /usr/bin/bash /usr/local/bin/bash; do
if [ -x "$bash" ]; then
exec "$bash" "$0" "$@"
fi
done
echo "error: this script requires bash"
exit 1
fi