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