summaryrefslogtreecommitdiff
path: root/scripts/tarpkg
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/tarpkg')
-rwxr-xr-xscripts/tarpkg9
1 files changed, 2 insertions, 7 deletions
diff --git a/scripts/tarpkg b/scripts/tarpkg
index c126af594..818f99ea7 100755
--- a/scripts/tarpkg
+++ b/scripts/tarpkg
@@ -9,16 +9,11 @@ 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:]]*//")
- cd $2
- rm -rf CONTROL
- tar -czf $3/${pkgname}_${version}_${arch}.tar.gz .
- cd -
- exit 0
+ rm -rf $2/CONTROL
+ (cd $2 && tar -czf $3/${pkgname}_${version}_${arch}.tar.gz .)
elif [ "$1" = "install" ];then
tar -xzpf $2 -C ${INSTROOT}
- exit 0
else
echo "unknown command"
exit 1
fi
-exit 0