source: CMT/v1r16p20040901/mgr/cmt_uninstall_action.sh @ 1

Last change on this file since 1 was 1, checked in by arnault, 19 years ago

Import all tags

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