31 lines
613 B
Bash
31 lines
613 B
Bash
#!/bin/bash
|
|
#
|
|
# A simple script to create a sandbox for a new package
|
|
#
|
|
# params: $1=topdir ie. bash
|
|
#
|
|
. ${BUILDPKG_BASE}/scripts/buildpkg.functions
|
|
|
|
REQ_DIRS="stage src meta"
|
|
|
|
arg1=${1-'x'}
|
|
if [ "$arg1" == "x" ]; then
|
|
error $E_MISSING_ARGS
|
|
else
|
|
setdir "$buildpkgbase"
|
|
fi
|
|
|
|
echo "Creating sandbox for $arg1"
|
|
mkdir "$arg1"
|
|
for i in $REQ_DIRS
|
|
do
|
|
mkdir $arg1/$i
|
|
done
|
|
|
|
cp scripts/build.sh.generic $arg1/build.sh
|
|
chmod 755 $arg1/build.sh
|
|
if [ "$($UNAME -s)" == "IRIX" ]; then
|
|
$SED -e 's/bin\/bash/usr\/local\/bin\/bash/g' $arg1/build.sh > $arg1/build.sh.tmp
|
|
$MV $arg1/build.sh.tmp $arg1/build.sh
|
|
fi
|