xbps-src [chroot]: try different shells for /bin/sh symlinks.

This commit is contained in:
Juan RP 2011-07-01 00:29:11 +02:00
parent 61b0c7ec7c
commit a48dc4c512

View file

@ -183,7 +183,17 @@ _EOF
create_binsh_symlink()
{
if [ ! -h $XBPS_MASTERDIR/bin/sh ]; then
cd $XBPS_MASTERDIR/bin && ln -sf bash sh
cd $XBPS_MASTERDIR/bin
if [ -x bash ]; then
ln -sf bash sh
elif [ -x dash ]; then
ln -sf dash sh
elif [ -x busybox ]; then
ln -sf busybox sh
else
msg_error "cannot find a suitable shell for chroot!\n"
fi
fi
}