File: uninstall.sh

package info (click to toggle)
libsdsl 2.1.1%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,020 kB
  • sloc: cpp: 42,286; makefile: 1,171; ansic: 318; sh: 201; python: 27
file content (39 lines) | stat: -rwxr-xr-x 733 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
# This script removes all installed  sdsl files
# on a LINUX or Mac OS X system

CUR_DIR=`pwd`
SDSL_INSTALL_PREFIX=${HOME}
if [ $# -ge 1 ]; then
	SDSL_INSTALL_PREFIX=${1}
fi

echo "Library files will be removed from"
echo "'${SDSL_INSTALL_PREFIX}/lib' and"
echo "'${SDSL_INSTALL_PREFIX}/include'"


cd "${CUR_DIR}"
OLD_DIR="$( cd "$( dirname "$0" )" && pwd )" # gets the directory where the script is located in
cd "${OLD_DIR}"
OLD_DIR=`pwd`

cd build # change into the build directory
if [ $? != 0 ]; then
	exit 1
fi

if [ -f Makefile ]; then
    make uninstall-sdsl
fi

if [ $? != 0 ]; then
    exit 1
fi

./clean.sh # clean-up build directory
if [ $? != 0 ]; then
	exit 1
fi

echo "Installed sdsl files were removed."