diff options
author | Leah Neukirchen <leah@vuxu.org> | 2020-01-31 15:59:31 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2020-01-31 15:59:31 +0100 |
commit | 8b4c9aad73a0ec3bcf2bc2c66a356fc829a487ec (patch) | |
tree | 3dcd6061810fe0298cc9913f5b93f0df142f1eab /build-template | |
parent | 289055301db8c7bf26eaf47228e0747c69623bfd (diff) | |
download | mewix-8b4c9aad73a0ec3bcf2bc2c66a356fc829a487ec.tar.gz mewix-8b4c9aad73a0ec3bcf2bc2c66a356fc829a487ec.tar.xz mewix-8b4c9aad73a0ec3bcf2bc2c66a356fc829a487ec.zip |
add package categories, defaulting to a/
Diffstat (limited to 'build-template')
-rwxr-xr-x | build-template | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/build-template b/build-template index 5fe652c..7d51a3a 100755 --- a/build-template +++ b/build-template @@ -3,11 +3,21 @@ rm -rf dst mkdir dst -cat lib1.sh $1 lib2.sh | ./enter-newroot +x=$1 +pkgname=${x##*/} +x=${x%/*} +pkgcat=${x##*/} -for d in dst/*/*; do +{ + echo "export pkgname=$pkgname pkgcat=$pkgcat;" + cat lib1.sh $1 lib2.sh +} | ./enter-newroot + +for d in dst/$pkgcat/$pkgname/*; do [ -d "$d" ] || continue - tar czvf pkg/$( echo "$d" | sed 's/^dst\///; s:/:@:g' ).tar.xz -C $d . --sort=name --mtime="@0" --owner=0 --group=0 --numeric-owner + mkdir -p pkg/$pkgcat + tar czvf pkg/$pkgcat/$pkgname@${d##*/}.tar.xz -C dst $pkgcat/$pkgname \ + --sort=name --mtime="@0" --owner=0 --group=0 --numeric-owner echo $d done |