diff options
author | Ujjwala <ujjwala@gluster.com> | 2011-12-08 15:09:25 +0530 |
---|---|---|
committer | Ujjwala <ujjwala@gluster.com> | 2011-12-08 15:09:25 +0530 |
commit | 020c2d441e83e616010b921bd266086ed387afa7 (patch) | |
tree | 03e9818358b2c144bbed644e2c2ef09672f865a7 /helper_scrips/glusterfs_uninstall.sh | |
parent | 7b6014ce85b4dfca6616f137665cd00e5624c4b0 (diff) | |
parent | d5457aa0ba65d2a54ef310f1dd9e8adddb0fd465 (diff) |
Merge branch 'master' of https://github.com/gluster/qa
Diffstat (limited to 'helper_scrips/glusterfs_uninstall.sh')
-rwxr-xr-x | helper_scrips/glusterfs_uninstall.sh | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/helper_scrips/glusterfs_uninstall.sh b/helper_scrips/glusterfs_uninstall.sh new file mode 100755 index 0000000..31a000d --- /dev/null +++ b/helper_scrips/glusterfs_uninstall.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +#set -x; + +function _init () +{ + # echo $0; + # echo $#; + # echo $1; + set -u; + if [ $# -lt 1 ]; then + echo "usage: download_and_install <glusterfs-version>"; + exit 1; + fi + + version=$1; + echo $version; + echo $version | grep "glusterfs" 2>/dev/null 1>/dev/null; + if [ $? -ne 0 ]; then + echo "given argument is not glusterfs"; + exit 1; + fi +} + +function un_install () +{ + cd /root/$version; + + cd build; + make uninstall && make clean && make distclean; + + cd /root; +} + +main () +{ + + if [ ! -d $version ]; then + echo "the glusterfs version ($version) directory is not there." + return 1; + fi + + un_install; +} + +_init "$@" && main "$@" |