created packman daily update script
authorAndreas Steffen <andreas.steffen@strongswan.org>
Thu, 8 Nov 2012 08:19:10 +0000 (09:19 +0100)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Thu, 8 Nov 2012 08:19:10 +0000 (09:19 +0100)
src/libimcv/plugins/imv_os/Makefile.am
src/libimcv/plugins/imv_os/pacman.sh [new file with mode: 0755]

index e0a04af..58edc69 100644 (file)
@@ -20,3 +20,5 @@ pacman_SOURCES = pacman.c
 pacman_LDADD = $(top_builddir)/src/libstrongswan/libstrongswan.la
 pacman.o :     $(top_builddir)/config.status
 
+EXTRA_DIST = pacman.sh
+
diff --git a/src/libimcv/plugins/imv_os/pacman.sh b/src/libimcv/plugins/imv_os/pacman.sh
new file mode 100755 (executable)
index 0000000..289436e
--- /dev/null
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+DATE=`date +%Y%m%d`
+DEBIAN=http://packages.debian.org
+UBUNTU=http://packages.ubuntu.com
+UBUNTU_VERSIONS="quantal precise oneiric lucid"
+PACKAGES=allpackages?format=txt.gz
+
+for v in $UBUNTU_VERSIONS
+do
+  wget $UBUNTU/$v/$PACKAGES -O $DATE-$v.txt.gz
+  wget $UBUNTU/$v-updates/$PACKAGES -O $DATE-$v-updates.txt.gz
+done
+
+wget $DEBIAN/stable/$PACKAGES -O $DATE-squeeze.txt.gz
+gunzip *.gz
+
+ipsec pacman --product "Ubuntu 12.10" --file $DATE-quantal.txt
+echo
+ipsec pacman --product "Ubuntu 12.10" --file $DATE-quantal-updates.txt --update
+echo
+ipsec pacman --product "Ubuntu 12.04" --file $DATE-precise.txt
+echo
+ipsec pacman --product "Ubuntu 12.04" --file $DATE-precise-updates.txt
+echo
+ipsec pacman --product "Ubuntu 11.10" --file $DATE-oneiric.txt
+echo
+ipsec pacman --product "Ubuntu 11.10" --file $DATE-oneiric-updates.txt --update
+echo
+ipsec pacman --product "Ubuntu 10.04" --file $DATE-lucid.txt
+echo
+ipsec pacman --product "Ubuntu 10.04" --file $DATE-lucid-updates.txt --update
+echo
+ipsec pacman --product "Debian squeeze" --file $DATE-squeeze.txt
+
+cp config.db config.db-$DATE