]> git.donarmstrong.com Git - bin.git/blobdiff - build_archive
add reset usb bus command
[bin.git] / build_archive
index 1009eb91aa62f8d831565c394efe4f22295c4b7e..99a1a41fbe9abf2a7fa5b30e1b7c6e69d135affe 100755 (executable)
@@ -1,9 +1,35 @@
-#!/bin/sh
+#!/bin/bash
+
+ORIGIN=donarmstrong
+LABEL=donarmstrong
+ARCHITECTURES="all i386 amd64 powerpc"
+
+if [ -e .build_archive.conf ]; then
+    . .build_archive.conf
+fi;
+
 if [ ! -e Release ]; then
     cat - <<EOF > Release
 Origin: donarmstrong
 Label: donarmstrong
-Architectures: all i386
+Architectures: ${ARCHITECTURES}
 EOF
 fi;
-apt-ftparchive packages . |gzip -c > Packages.gz
\ No newline at end of file
+apt-ftparchive -qq --db apt_ftparchive.db --contents packages . > Packages;
+apt-ftparchive -qq --db apt_ftparchive.db sources . > Sources;
+apt-ftparchive -qq --db apt_ftparchive.db contents . > Contents;
+apt-ftparchive -qq --db apt_ftparchive.db \
+    -o APT::FTPArchive::Release::Origin="$ORIGIN" \
+    -o APT::FTPArchive::Release::Label="$LABEL" \
+    -o APT::FTPArchive::Release::Architectures="$ARCHITECTURES" \
+    release . > Release;
+
+for file in Sources Packages Contents; do
+    gzip -c $file > ${file}.gz
+    bzip2 -c $file > ${file}.bz2
+done;
+
+if [ -n "$SIGNING_KEY" ]; then
+    rm -f Release.gpg
+    gpg ${GPG_OPTIONS} --default-key "${SIGNING_KEY}" --armor  --output Release.gpg --detach-sign Release
+fi;