On Sat, Sep 29, 2012 at 08:55:18AM +0200, Sven Joachim wrote: > > case "$1" in > > install|upgrade) > > if dpkg --compare-versions "$2" lt "3.0.9" ; then > > People who had already upgraded from earlier versions will still have an > empty directory, so the version should be adjusted. > > > rmdir /usr/share/doc/mlterm > > The directory is not guaranteed to be empty at this time. Also, you > want to protect this with "|| true" to make the script idempotent > (see Policy §6.2). ---end quoted text---
Thanks for your comments, I fixed the above issues in the attached script (still not tested). -- أحمد المحمودي (Ahmed El-Mahmoudy) Digital design engineer GPG KeyID: 0xEDDDA1B7 GPG Fingerprint: 8206 A196 2084 7E6D 0DF8 B176 BC19 6A94 EDDD A1B7
#!/bin/sh set -e case "$1" in install|upgrade) if dpkg --compare-versions "$2" lt "3.1.2-1.1" ; then rm -rf /usr/share/doc/mlterm || true fi ;; abort-upgrade) ;; *) echo "preinst called with unknown argument \`$1'" >&2 exit 1 ;; esac #DEBHELPER# exit 0
signature.asc
Description: Digital signature