Improvements to hubmgr.
[doldaconnect.git] / autopackage / makeall
1 #!/bin/sh
2
3 set -e
4
5 tempdir="$(mktemp -d /tmp/dc-apkg-XXXXXX)"
6 cd "$tempdir"
7 git clone git://git.dolda2000.com/doldaconnect
8 cd doldaconnect
9 ./bootstrap
10 ./configure
11
12 packages="`cat autopackage/build`"
13 version="`sed -n 's/^.* VERSION "\([^"]*\)".*$/\1/p' config.h`"
14
15 for pkg in $packages; do
16     sfile="autopackage/$pkg.apspec"
17     pname="$(sed -n 's/^ShortName: *\([^ ]\+\)$/\1/p' "$sfile")"
18     if [ -z "$pname" ]; then
19         echo "makeall: could not find apkg shortname for $sfile" >&2
20         exit 1
21     fi
22     make clean
23     PACKAGEFILENAME="$pname.package" makepackage "$sfile"
24     mv "$pname-$version.package" "$pname-$version.package.meta" "$pname.xml" "$tempdir"
25 done
26
27 rm -rf "$tempdir/doldaconnect"
28
29 echo "packages are in $tempdir"