diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2009-10-17 19:41:13 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2009-10-17 19:41:13 +0200 |
commit | c008b8741447a77371f3fd487830bfd7952dbdcd (patch) | |
tree | d93378254682782dbe0175dcf69edb1fbf65dbe3 /scripts/tarpkg | |
parent | 16b627883cdd2fb2258002b30dfa61c440373e9c (diff) | |
parent | 6d26b19269a28ff576e872473cb3b4610a61fceb (diff) |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'scripts/tarpkg')
-rwxr-xr-x | scripts/tarpkg | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/tarpkg b/scripts/tarpkg new file mode 100755 index 000000000..818f99ea7 --- /dev/null +++ b/scripts/tarpkg @@ -0,0 +1,19 @@ +#!/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:]]*//") + rm -rf $2/CONTROL + (cd $2 && tar -czf $3/${pkgname}_${version}_${arch}.tar.gz .) +elif [ "$1" = "install" ];then + tar -xzpf $2 -C ${INSTROOT} +else + echo "unknown command" + exit 1 +fi |