summary refs log tree commit diff
path: root/build-template
blob: dbebb54d8ee6b9668acb88a0ba80e074c8d73d72 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

set -e

rm -rf dst tmp
mkdir dst tmp

x=$1
pkgname=${x##*/}
x=${x%/*}
pkgcat=${x##*/}

{
  echo "export pkgname=$pkgname pkgcat=$pkgcat;"
  cat lib1.sh $1 lib2.sh
} | ./enter-newroot

for d in dst/$pkgcat/$pkgname/*; do
  [ -d "$d" ] || continue

  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