8491: move files from arvados-dev into their new places
[arvados.git] / build / rails-package-scripts / postrm.sh
1 #!/bin/sh
2 # This code runs after package variable definitions and step2.sh.
3
4 set -e
5
6 purge () {
7   rm -rf $SHARED_PATH/vendor_bundle
8   rm -rf $SHARED_PATH/log
9   rm -rf $CONFIG_PATH
10   rmdir $SHARED_PATH || true
11   rmdir $INSTALL_PATH || true
12 }
13
14 if [ "$1" = 'purge' ]; then
15   # This is a debian-based system and purge was requested
16   purge
17 elif [ "$1" = "0" ]; then
18   # This is an rpm-based system, no guarantees are made, always purge
19   # Apparently yum doesn't actually remember what it installed.
20   # Clean those files up here, then purge.
21   rm -rf $RELEASE_PATH
22   purge
23 fi