diff options
author | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-02-18 01:56:34 +0000 |
---|---|---|
committer | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-02-18 01:56:34 +0000 |
commit | 8185891e28635bdb83fdf4ba4391030912dae596 (patch) | |
tree | 66a946535bdd228514750233b2cc99dd1866ff64 /pcr/grass/grass.install | |
parent | 60a11f87366fdfbd114cdc91ff813518858e5f8d (diff) |
Tue Feb 18 01:56:27 UTC 2014
Diffstat (limited to 'pcr/grass/grass.install')
-rw-r--r-- | pcr/grass/grass.install | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/pcr/grass/grass.install b/pcr/grass/grass.install new file mode 100644 index 000000000..878ea0186 --- /dev/null +++ b/pcr/grass/grass.install @@ -0,0 +1,26 @@ +## arg 1: the new package version +post_install() { + pkgver=${1%-*} + + # Create symlink for version workaround. + ln -sf /opt/grass-${pkgver} /opt/grass + + echo 'Please relogin for required variables to be set from /etc/profile.d/grass.sh' +} + +## arg 1: the new package version +## arg 2: the old package version +post_upgrade() { + pkgver=${1%-*} + + # Updating symlink for new version + ln -sf /opt/grass-${pkgver} /opt/grass +} + +## arg 1: the old package version +pre_remove() { + # Removing cruft symlink + rm -f /opt/grass +} + +# vim:set ts=2 sw=2 et: |