buildpkg/newpkg

39 lines
923 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
fi
if [ "$(${__uname} -s)" == "SunOS" ]; then
${__cp} scripts/pkgdef.template $arg1/meta/pkgdef
fi
${__cp} scripts/relnotes.template.irix $arg1/meta/relnotes
# Make build script executable
chmod 755 $arg1/build.sh