r36231 - /packages/atlas/trunk/debian/generate.sh

sylvestre at users.alioth.debian.org sylvestre at users.alioth.debian.org
Fri Feb 26 12:13:51 UTC 2010


Author: sylvestre
Date: Fri Feb 26 12:13:49 2010
New Revision: 36231

URL: http://svn.debian.org/wsvn/debian-science/?sc=1&rev=36231
Log:
My crappy script to regenerate postinst & prerm

Added:
    packages/atlas/trunk/debian/generate.sh

Added: packages/atlas/trunk/debian/generate.sh
URL: http://svn.debian.org/wsvn/debian-science/packages/atlas/trunk/debian/generate.sh?rev=36231&op=file
==============================================================================
--- packages/atlas/trunk/debian/generate.sh (added)
+++ packages/atlas/trunk/debian/generate.sh Fri Feb 26 12:13:49 2010
@@ -1,0 +1,24 @@
+#!/bin/sh
+
+# This crappy script regenerates *.postinst & *.prerm from 
+# some templates
+LIST="amd64sse3 base core2sse3 corei7sse3 sse sse2 sse3 "
+POSTINST="libatlas3gf-template.postinst"
+PRERM="libatlas3gf-template.prerm"
+POSTINSTDEV="libatlas-template-dev.postinst"
+PRERMDEV="libatlas-template-dev.prerm"
+
+for pkg in $LIST; do
+	target=$(echo $POSTINST|sed -e "s|template|$pkg|")
+	targetprerm=$(echo $PRERM|sed -e "s|template|$pkg|")
+
+	sed -e "s|PACKAGE|$pkg|g" $POSTINST > $target
+	sed -e "s|PACKAGE|$pkg|g" $PRERM > $targetprerm
+
+        targetdev=$(echo $POSTINSTDEV|sed -e "s|template|$pkg|")
+        targetprermdev=$(echo $PRERMDEV|sed -e "s|template|$pkg|")
+
+        sed -e "s|PACKAGE|$pkg|g" $POSTINSTDEV > $targetdev
+        sed -e "s|PACKAGE|$pkg|g" $PRERMDEV > $targetprermdev
+
+done




More information about the debian-science-commits mailing list