configurable builds
This commit is contained in:
parent
c178d25479
commit
bdd76bfe0b
8
config
Normal file
8
config
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ -z "$BUILD_CONFIG" ] ; then
|
||||||
|
echo "Set BUILD_CONFIG first"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
. config-$BUILD_CONFIG
|
2
enter.sh
2
enter.sh
|
@ -3,7 +3,7 @@
|
||||||
# make sure this was run as root
|
# make sure this was run as root
|
||||||
if [ $UID -ne 0 ] ; then
|
if [ $UID -ne 0 ] ; then
|
||||||
echo "Need to be root; trying sudo"
|
echo "Need to be root; trying sudo"
|
||||||
exec sudo $0 "$@"
|
exec sudo env BUILD_CONFIG=$BUILD_CONFIG $0 "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# enter the chroot and run the command (if supplied) or a shell
|
# enter the chroot and run the command (if supplied) or a shell
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# passwords during execution
|
# passwords during execution
|
||||||
if [ $UID -ne 0 ] ; then
|
if [ $UID -ne 0 ] ; then
|
||||||
echo "Need to be root; trying sudo"
|
echo "Need to be root; trying sudo"
|
||||||
exec sudo nice $0 "$@"
|
exec sudo nice env BUILD_CONFIG=$BUILD_CONFIG $0 "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
. config || exit 0
|
. config || exit 0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user