[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

dpkg --compare-versions



I need to run some commands in the postinst of ifmail only if the user
is upgrading a previous. I tried:

if [ "$1" == "upgrade" -a -n "$2" -a "$2" != "<unknown>" ]; then
  if dpkg --compare-versions $2 le 2.12tx8.6; then
[...]
  fi
fi

but it does not works, I think the first test is wrong.
Does someone has a working example?

-- 
ciao,
Marco


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: