mirror of
https://github.com/outbackdingo/ports.git
synced 2026-01-27 18:20:07 +00:00
25 lines
340 B
Bash
Executable File
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
|