1 2 3 4 5 6 7 8 9 10 11 12
pre_upgrade() { if(test `vercmp '3.4.3-5' "$2"` -ge 0); then mv /usr/share/jnethack /tmp/jnethack-backup fi } post_upgrade() { if(test `vercmp '3.4.3-5' "$2"` -ge 0); then rm -rf /var/games/jnethack mv /tmp/jnethack-backup /var/games/jnethack fi }