Line | |
---|
1 | |
---|
2 | |
---|
3 | #------------------------------------------------------------------------------ |
---|
4 | # |
---|
5 | # 1 absolute source directory |
---|
6 | # 2 file name |
---|
7 | # 3 absolute installation directory |
---|
8 | # |
---|
9 | #------------------------------------------------------------------------------ |
---|
10 | |
---|
11 | source_dir=$1 |
---|
12 | file_name=$2 |
---|
13 | install_dir=$3 |
---|
14 | install_command=$4 |
---|
15 | |
---|
16 | dest_file_path=${install_dir}/${file_name} |
---|
17 | ref_file=${dest_file_path}.cmtref |
---|
18 | full_source_name=${source_dir}/${file_name} |
---|
19 | |
---|
20 | if test "${CMTINSTALLAREA}" = "" ; then |
---|
21 | echo "No installation directory specified" |
---|
22 | exit 0 |
---|
23 | fi |
---|
24 | |
---|
25 | b=`echo ${CMTINSTALLAREA} | sed -e 's#/InstallArea##'` |
---|
26 | b=`(cd ${b}; pwd)` |
---|
27 | a=`pwd | grep -e "${b}"` |
---|
28 | if test "${a}" = ""; then |
---|
29 | echo "Current directory outside of the installation area. Cannot proceed" |
---|
30 | exit 0 |
---|
31 | fi |
---|
32 | |
---|
33 | if test "${install_dir}" = "" ; then |
---|
34 | exit 0 |
---|
35 | fi |
---|
36 | |
---|
37 | if test ! -d ${install_dir}; then |
---|
38 | echo "Cannot uninstall file ${file_name}, no installation directory specified" |
---|
39 | exit 0 |
---|
40 | fi |
---|
41 | |
---|
42 | echo Removing file ${file_name} from ${install_dir} |
---|
43 | |
---|
44 | if test -f ${dest_file_path}; then |
---|
45 | /bin/rm -f ${dest_file_path} |
---|
46 | fi |
---|
47 | |
---|
48 | if test -f ${ref_file}; then |
---|
49 | /bin/rm -f ${ref_file} |
---|
50 | fi |
---|
51 | |
---|
Note: See
TracBrowser
for help on using the repository browser.