buildpkg/newpkg
2009-12-19 14:38:42 +01:00

38 lines
882 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
if [ "$($UNAME -s)" == "IRIX" -o "$($UNAME -s)" == "IRIX64" ]; then
$SED -e 's;bin/bash;usr/tgcware/bin/bash;g' $arg1/build.sh > $arg1/build.sh.tmp
$MV $arg1/build.sh.tmp $arg1/build.sh
$CP scripts/pkgdef.template.irix $arg1/meta/pkgdef
$CP scripts/relnotes.template.irix $arg1/meta/relnotes
fi
if [ "$($UNAME -s)" == "SunOS" ]; then
$CP scripts/pkgdef.template $arg1/meta/pkgdef
fi
# Make build script executable
chmod 755 $arg1/build.sh