#!/bin/sh # # Copyright (C) 2007 Smithsonian Astrophysical Observatory # # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # # uninstall_4.0_scripts # # Version 1.0 (08 March 2007) # # Usage: # unix% cd $ASCDS_INSTALL/contrib # unix% ./uninstall_CIAO4_scripts # # Description: # # This script removes any files installed in $ASCDS_INSTALL/contrib # via a CIAO Scripts tarfile released for CIAO 4.0 or later. It is # designed for users who wish to remove old files and directories # before unpacking a new CIAO Scripts tarfile. # # The uninstall script contains a list of the specific script files # to remove, along with the parameter files and documentation. No # other files in your CIAO distribution can be deleted by this script. # # DO NOT run the script if: # # - You have made custom modifications to any of the scripts and have # installed these (under their original names) in $ASCDS_INSTALL/contrib. # # - You wish to continue using older versions of the CIAO scripts # # For more information on available CIAO scripts or to download # the latest versions, see # http://cxc.harvard.edu/ciao/download/scripts/ # old_files=' bin/acis_bkgrnd_lookup bin/acis_fef_lookup bin/acis_set_ardlib bin/acisspec bin/add_grating_orders bin/add_grating_spectra bin/fullgarf bin/get_sky_limits bin/merge_all bin/mkBgReg.pl bin/mkSubBgReg.pl bin/psextract bin/tg_bkg share/slsh/local-packages/analyze_ltcrv.sl share/slsh/local-packages/lc_clean.sl doc/xml/acis_bkgrnd_lookup.xml doc/xml/acis_fef_lookup.xml doc/xml/acis_set_ardlib.xml doc/xml/acisspec.xml doc/xml/add_grating_orders.xml doc/xml/add_grating_spectra.xml doc/xml/analyze_ltcrv.xml doc/xml/fullgarf.xml doc/xml/get_sky_limits.xml doc/xml/lc_clean.xml doc/xml/merge_all.xml doc/xml/mkbgreg.xml doc/xml/mksubbgreg.xml doc/xml/psextract.xml doc/xml/tg_bkg.xml param/acis_bkgrnd_lookup.par param/acis_fef_lookup.par param/acis_set_ardlib.par param/acisspec.par param/add_grating_orders.par param/add_grating_spectra.par param/fullgarf.par param/get_sky_limits.par param/merge_all.par param/psextract.par README_CIAO_scripts VERSION.CIAO_scripts Changes.CIAO_scripts ' old_dirs=' bin doc/xml doc param share/slsh/local-packages share/slsh share ' for file in $old_files do if [ -f $file ]; then echo "Removing file $file" rm $file fi done for dir in $old_dirs do if [ -d $dir ]; then if [ -z "`ls $dir`" ]; then echo "Removing empty directory $dir" rmdir $dir fi fi done echo "Done!"