## arg 1:  the new package version
post_install() {
  post_upgrade $1 0
}

## arg 1:  the new package version
## arg 2:  the old package version
post_upgrade() {
  if [ `vercmp $2 0.31` -eq -1 ]; then
    echo '  DF2010 Changelog: http://df.magmawiki.com/index.php/DF2010:Release_Information'
  fi
  if [ `vercmp $2 0.31.13` -eq -1 ]; then
    echo "  !! Warning: !!"
    echo "  DF 0.31.13 is very likely to break adventure mode saves!"
  fi
  # Make sure that permissions are correct
  chown -R root:games /opt/df_linux/data
  find /opt/df_linux/data/save -type d -exec chmod 775 {} + &
  find /opt/df_linux/data/save -type f -exec chmod 664 {} + &
}

# vim:set ts=2 sw=2 et:
