source: CMT/v1r14p20031120/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=`echo ${CMTINSTALLAREA} | sed -e 's#/InstallArea##'`
26b=`(cd ${b}; pwd)`
27a=`pwd | grep -e "${b}"`
28if test "${a}" = ""; then
29  echo "Current directory outside of the installation area. Cannot proceed"
30  exit 0
31fi
32
33if test "${install_dir}" = "" ; then
34  exit 0
35fi
36
37if test ! -d ${install_dir}; then
38  echo "Cannot uninstall file ${file_name}, no installation directory specified"
39  exit 0
40fi
41
42echo Removing file ${file_name} from ${install_dir}
43
44if test -f ${dest_file_path}; then
45  /bin/rm -f ${dest_file_path}
46fi
47
48if test -f ${ref_file}; then
49  /bin/rm -f ${ref_file}
50fi
51
Note: See TracBrowser for help on using the repository browser.