home *** CD-ROM | disk | FTP | other *** search
- #!/bin/csh -f
-
- set LOGFILE = `ls /tmp/* | grep BX351_DISTLOAD_LOG | wc -l`
-
- if ($LOGFILE == 0) then
- if ( -e /usr/lib/X11/builderXcessory) then
- set INST_PATH = /usr/lib/X11/builderXcessory
- else
- set INST_PATH = "none"
- endif
- else
- set INST_PATH = `cat /tmp/BX351_DISTLOAD_LOG* | grep NEW_DIR_FROM_HM11 | /usr/bin/awk '{print $2}' | tail -1`
- endif
-
- if ($INST_PATH == "") then
- LOOP1:
- echo " "
- echo "Enter the full path name of the directory"
- echo "where the demo is installed (or 'q' to quit): \c"
- set INST_PATH=($<)
- if ( $#INST_PATH == 0 ) then
- echo " "
- echo "Input error. Please try again."
- goto LOOP1
- else if ( $INST_PATH == 'q' ) then
- echo " "
- echo "... Bye."
- sleep 3
- exit
- endif
- else
- if ( -r $INST_PATH ) then
-
- if ( -w $INST_PATH ) then
- echo " "
- echo "About the remove the entire $INST_PATH directory."
- echo "Is this OK (y/n)? \c"
- set ans=($<)
- if ( $ans == 'y' ) then
- echo " "
- echo "Removing the default installation directory:"
- echo " $INST_PATH"
- echo " "
- cd $INST_PATH
- ./removebxlinks
- cd
- /bin/rm -rf $INST_PATH
- echo "Removal complete. "
- sleep 3
- exit
- else
- echo "... Bye."
- sleep 3
- exit
- endif
- else
- echo " "
- echo "You do not have permission to remove the $INST_PATH directory."
- echo "If you are SURE you want to remove this, you will be asked"
- echo "for the root password before proceeding."
- echo " "
- echo "Continue (y/n)? \c"
- set ans=($<)
- if ( $ans == 'y' ) then
- echo " "
- echo "Removing $INST_PATH. Please wait..."
- su - root -c "/bin/rm -rf $INST_PATH"
- echo " "
- echo "Removal complete."
- sleep 3
- echo "Press Enter to exit this window... \c"
- set a = $<
- exit
- else
- echo " "
- echo "... Bye."
- sleep 3
- echo "Press Enter to exit this window... \c"
- set a = $<
- exit
- endif
- endif
- else
- echo " "
- echo "Could not find the $INST_PATH directory. Please try again."
- echo " "
- echo " "
- echo "... Bye."
- sleep 10
- endif
- echo "Press Enter to exit this window... \c"
- set a = $<
- endif
-