~ubuntu-branches/debian/jessie/eso-midas/jessie

« back to all changes in this revision

Viewing changes to system/unix/cleanmidas.sh

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2014-04-22 14:44:58 UTC
  • Revision ID: package-import@ubuntu.com-20140422144458-okiwi1assxkkiz39
Tags: upstream-13.09pl1.2+dfsg
ImportĀ upstreamĀ versionĀ 13.09pl1.2+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
# @(#)cleanmidas.sh     19.1 (ESO-IPG) 02/25/03 14:31:58
 
3
#
 
4
# cleanrelease procedure
 
5
# remove all dependent files
 
6
# .VERSION 1.1          04 Nov 88 - C. Guirao [ESO-IPG]
 
7
 
 
8
# Determine how to set prompt
 
9
if [ "`echo -n a`" = a ]; then
 
10
        # BSD echo
 
11
        NNN=-n
 
12
        CCC=
 
13
else
 
14
        # USG echo
 
15
        NNN=
 
16
        CCC='\c'
 
17
fi
 
18
 
 
19
necho()
 
20
{
 
21
        #
 
22
        #  A safe way to perform echo without sending a new-line
 
23
        #
 
24
 
 
25
        echo $NNN "$*" $CCC > /dev/tty
 
26
}
 
27
 
 
28
ask_yn()
 
29
{
 
30
        #
 
31
        #  Get a yes/no answer from the user; $1 is the prompt, $2 the default
 
32
        #
 
33
 
 
34
        prompt="$1"
 
35
        def="${2:-y}"           # yes is the default if not supplied
 
36
        while true; do
 
37
                necho "$prompt [$def]: "
 
38
                read answer
 
39
                answer="${answer:-$def}"
 
40
                case "$answer" in
 
41
                        [yY])
 
42
                                answer=y
 
43
                                break
 
44
                                ;;
 
45
                        [nN])
 
46
                                answer=n
 
47
                                break
 
48
                                ;;
 
49
                          *)
 
50
                                error Please enter "'y'" or "'n'".
 
51
                                ;;
 
52
                esac
 
53
        done
 
54
        [ $answer = y ]
 
55
}
 
56
 
 
57
 
 
58
MID_HERE=`pwd`
 
59
MIDVERS=`echo $MID_HERE | sed 's/^.*midas\/\([^\/]*\).*$/\1/'`
 
60
MIDASHOME=`echo $MID_HERE | sed 's/\/'$MIDVERS'.*$//'`
 
61
 
 
62
MID_HOME=$MIDASHOME/$MIDVERS
 
63
 
 
64
export MIDASHOME MIDVERS
 
65
 
 
66
if ask_yn "REMOVING DEPENDENT FILES UNDER $MIDASHOME/$MIDVERS"; then
 
67
  echo ""
 
68
else
 
69
  exit 0
 
70
fi
 
71
 
 
72
cd $MIDASHOME/$MIDVERS
 
73
 
 
74
echo "rm -rf install/vms install/unix/test install/unix/systems"
 
75
rm -rf install/vms install/unix/test install/unix/systems
 
76
echo "rm -rf local/shlib local/preinstall local/setup local/README"
 
77
rm -rf local/util local/shlib local/preinstall local/setup local/README
 
78
echo "rm -rf test tmp contrib/lib"
 
79
rm -rf test tmp contrib/lib
 
80
echo "rm -rf util/bdf2ps util/help util/libsrc util/ltape util/tapeserv"
 
81
rm -rf util/bdf2ps util/help util/libsrc util/ltape util/tapeserv
 
82
echo "rm -rf pipeline"
 
83
echo "mkdir pipeline"
 
84
echo "chmod 775 pipeline"
 
85
echo "touch pipeline/EMPTY"
 
86
rm -rf pipeline
 
87
mkdir pipeline
 
88
chmod 775 pipeline
 
89
touch pipeline/EMPTY
 
90
 
 
91
echo "rm -f *.o *.for *.tex *.mar *.fc *.doc *.csh *.com *.f *.c"
 
92
echo "rm -f SELECTED DEPENDENCIES"
 
93
 
 
94
find . \( \
 
95
        -name "*.o" -o \
 
96
        -name "*.for" -o  \
 
97
        -name "*.tex" -o  \
 
98
        -name "*.mar" -o  \
 
99
        -name "*.fc" -o  \
 
100
        -name "*.doc" -o  \
 
101
        -name "*.csh" -o  \
 
102
        -name "*.com" -o  \
 
103
        -name "*.lasc" -o  \
 
104
        -name "*.iasc" -o  \
 
105
        -name "*.f" -o  \
 
106
        -name "SELECTED" -o \
 
107
        -name "DEPENDENCIES" -o \
 
108
        -name "*.c" \) -exec rm -f {} \;
 
109
 
 
110
cd $MIDASHOME/$MIDVERS/system/exec
 
111
echo "rm -f computer.exe ftoc_fx.exe ftoc_hp*  ftoc_osf.exe"
 
112
rm -f computer.exe ftoc_fx.exe ftoc_hp*  ftoc_osf.exe
 
113
echo "rm -f ftoc_pc.exe ftoc_sun.exe  ftoc_titan.exe  fontsup.exe"
 
114
rm -f ftoc_pc.exe ftoc_sun.exe  ftoc_titan.exe  fontsup.exe
 
115
 
 
116
cd $MIDASHOME/$MIDVERS
 
117
echo "rm -rf ./gui/GraphLib ./gui/incl ./gui/lib/*.a"
 
118
rm -rf ./gui/GraphLib ./gui/incl ./gui/lib/*.a
 
119
 
 
120
cd $MIDASHOME/$MIDVERS/lib
 
121
 
 
122
# Libraries included in libmidas.a and libgmidas.a
 
123
# For 95NOV also: rm -f libdio.a libdsp.a
 
124
rm -f libos.a libftoc.a libst.a libtbl.a libidicl.a libagl3.a libplot.a 
 
125
#
 
126
rm -f libreadline.a libmath.a libtw.a libtw3.a ../monit/libprep.a
 
127
#
 
128
# Libraries from applic
 
129
#rm -f libfit.a libfituser.a libagen.a libaplot.a libstat.a