Skip to content
Browse files

initial commit

  • Loading branch information...
0 parents commit 1e5559df4faff8d3527746684c0a3d33e89cd412 @richo richo committed Mar 18, 2012
Showing with 67 additions and 0 deletions.
  1. +5 −0 sign.sh
  2. +62 −0 upload.sh
5 sign.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+su richo -c "gpg -abs -o ~/Release.gpg /var/repo/apt/dists/sid/Release"
+mv ~richo/Release.gpg /var/repo/apt/dists/sid/Release.gpg
+chown root:root /var/repo/apt/dists/sid/Release.gpg
62 upload.sh
@@ -0,0 +1,62 @@
+#!/bin/sh
+
+
+if [ $(whoami) != "root" ]; then
+ echo "only root can add files to the repo"
+ exit
+fi
+
+INCOMING=/home/richo/apt-staging/
+APT_REPO=/var/repo/apt
+
+#
+# Make sure we're in the apt/ directory
+#
+cd $APT_REPO
+
+#
+# See if we found any new packages
+#
+found=0
+for i in $INCOMING/*.changes; do
+ if [ -e $i ]; then
+ found=`expr $found + 1`
+ fi
+done
+
+
+#
+# If we found none then exit
+#
+if [ "$found" -lt 1 ]; then
+ exit
+fi
+
+
+#
+# Now import each new package that we *did* find
+#
+for i in $INCOMING/*.changes; do
+
+ # Import package to 'sarge' distribution.
+ reprepro -Vb . include sid $i
+
+ # Delete the referenced files
+ sed '1,/Files:/d' $i | sed '/BEGIN PGP SIGNATURE/,$d' \
+ | while read MD SIZE SECTION PRIORITY NAME; do
+
+ if [ -z "$NAME" ]; then
+ continue
+ fi
+
+ #
+ # Delete the referenced file
+ #
+ if [ -f "$INCOMING/$NAME" ]; then
+ rm "$INCOMING/$NAME" || exit 1
+ fi
+ done
+
+ # Finally delete the .changes file itself.
+ rm $i
+done

0 comments on commit 1e5559d

Please sign in to comment.
Something went wrong with that request. Please try again.