-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathnewpkg
38 lines (32 loc) · 960 Bytes
/
newpkg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
#
# A simple script to create a sandbox for a new package
#
# params: $1=topdir ie. bash
#
. ${BUILDPKG_SCRIPTS}/buildpkg.functions
REQ_DIRS="stage src meta"
topdir=$1
if [ -z "$topdir" ]; then
error $E_MISSING_ARGS
else
setdir "$buildpkgbase"
fi
echo "Creating sandbox for $topdir"
${__mkdir} "$topdir"
for i in $REQ_DIRS
do
${__mkdir} $topdir/$i
done
${__cp} $buildpkgscripts/build.sh.generic $topdir/build.sh
if [ "$(${__uname} -s)" == "IRIX" -o "$(${__uname} -s)" == "IRIX64" ]; then
${__sed} -e "s;/bin/bash;$__bash;g" $topdir/build.sh > $topdir/build.sh.tmp
${__mv} $topdir/build.sh.tmp $topdir/build.sh
${__cp} $buildpkgscripts/pkgdef.template.irix $topdir/meta/pkgdef
fi
if [ "$(${__uname} -s)" == "SunOS" ]; then
${__cp} $buildpkgscripts/pkgdef.template $topdir/meta/pkgdef
fi
${__cp} $buildpkgscripts/relnotes.template.irix $topdir/meta/relnotes
# Make build script executable
chmod 755 $topdir/build.sh