From 46fb40237e4ef7ab85c9c2f68cac26c7d84d6075 Mon Sep 17 00:00:00 2001 From: LtWorf Date: Tue, 9 Dec 2008 17:47:45 +0000 Subject: [PATCH] coorected remove script git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@72 014f5005-505e-4b48-8d0a-63407b615a7c --- Makefile | 7 ++----- debscript/prerm | 10 ++++++++++ 2 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 debscript/prerm diff --git a/Makefile b/Makefile index f88046f..d89bdbe 100644 --- a/Makefile +++ b/Makefile @@ -99,12 +99,9 @@ debian: printf " py_compile.compile(\"/usr/share/python-support/relational/\"+i)\n" >> data/DEBIAN/postinst #Postrm file to remove optimized generated python files - echo "#!/bin/sh" > data/DEBIAN/postrm - echo "set -e" >> data/DEBIAN/postrm - echo "rm -rf /usr/share/python-support/relational/" >> data/DEBIAN/postrm - echo "exit 0" >> data/DEBIAN/postrm + cp debscript/prerm data/DEBIAN/prerm - chmod 0755 data/DEBIAN/postrm data/DEBIAN/postinst + chmod 0755 data/DEBIAN/prerm data/DEBIAN/postinst su -c "chown -R root:root data/*; dpkg -b data/ relational.deb; rm -rf data/" cp relational.deb relational_`./relational.py -v`+SVN`svn update | cut -d" " -f3 | tr -d "."`.deb diff --git a/debscript/prerm b/debscript/prerm new file mode 100644 index 0000000..8865c44 --- /dev/null +++ b/debscript/prerm @@ -0,0 +1,10 @@ +#!/bin/sh +set -e + +case $1 in + remove) + rm -rf /usr/share/python-support/relational/;; +esac + +exit 0 +