diff options
author | Linux User <wbx@linux.(none)> | 2009-10-01 20:26:05 +0200 |
---|---|---|
committer | Linux User <wbx@linux.(none)> | 2009-10-01 20:26:05 +0200 |
commit | 8759fa511c0464efaea926dcb1271c0ca95e4eb6 (patch) | |
tree | 525fc96ed62d206153794068a2f43116a095dbbe /scripts/tarpkg | |
parent | 22bb527c786d6631eec13f2328da05437a1e46b5 (diff) |
abstract package backend, add perl
Diffstat (limited to 'scripts/tarpkg')
-rwxr-xr-x | scripts/tarpkg | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/tarpkg b/scripts/tarpkg new file mode 100755 index 000000000..c126af594 --- /dev/null +++ b/scripts/tarpkg @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +# create/install compressed tar balls + +if [ "$1" = "build" ];then + if [ ! -d $2 ];then + echo "not a directory" + exit 1 + fi + 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 +elif [ "$1" = "install" ];then + tar -xzpf $2 -C ${INSTROOT} + exit 0 +else + echo "unknown command" + exit 1 +fi +exit 0 |