Packaging/preinst script and version checking

If none of the more specific forums is the right place to ask

Packaging/preinst script and version checking

Postby graysky » 2015-10-27 17:43

How can I use the preinst script to check to see if the version that is installed older than the version trying to be installed and if so, take an action?

For example: if the software installed is at a version less than 6.14 then take an action, else return 0?

preinst:
Code: Select all
set -e
case "$1" in
  install|upgrade)
  # if version installed <6.14 then do something else return 0
    ;;

  abort-upgrade)
    /bin/true
    ;;

  *)
    echo "preinst called with unknown argument \`$1'" >&2
    exit 1
    ;;
esac
exit 0
User avatar
graysky
 
Posts: 495
Joined: 2008-10-10 20:58

Return to General Questions

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable