Files
ports/scripts/makerootfs.sh
2021-01-08 15:56:20 +08:00

25 lines
340 B
Bash
Executable File

#!/bin/sh
as_root()
{
if [ $(id -u) = 0 ]; then
$*
elif [ -x /usr/bin/sudo ]; then
sudo $*
else
su -c \\"$*\\"
fi
}
PORTSDIR="$(dirname $(dirname $(realpath $0)))"
SCRIPTDIR="$(dirname $(realpath $0))"
[ -f $SCRIPTDIR/config ] && . $SCRIPTDIR/config
as_root $SCRIPTDIR/build.sh \
-zap \
-rebase \
-rootfs || exit 1
exit 0