summaryrefslogtreecommitdiff
path: root/scripts/tarpkg
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/tarpkg')
-rwxr-xr-xscripts/tarpkg5
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/tarpkg b/scripts/tarpkg
index bbb242a5e..37c0b2079 100755
--- a/scripts/tarpkg
+++ b/scripts/tarpkg
@@ -10,10 +10,9 @@ if [ "$1" = "build" ];then
pkgname=$(grep "^Package:" $2/CONTROL/control | sed -e "s/^[^:]*:[[:space:]]*//")
version=$(grep "^Version:" $2/CONTROL/control | sed -e "s/^[^:]*:[[:space:]]*//")
arch=$(grep "^Architecture:" $2/CONTROL/control | sed -e "s/^[^:]*:[[:space:]]*//")
- mkdir -p ${2}/usr/lib/pkg
for file in preinst postinst prerm postrm; do
- [ ! -f $2/CONTROL/$file ] || ( cp $2/CONTROL/$file \
- ${2}/usr/lib/pkg/${pkgname}.$file && \
+ [ ! -f $2/CONTROL/$file ] || ( mkdir -p ${2}/usr/lib/pkg && \
+ cp $2/CONTROL/$file ${2}/usr/lib/pkg/${pkgname}.$file && \
chmod +x ${2}/usr/lib/pkg/${pkgname}.$file )
done
rm -rf $2/CONTROL