1 | #! /bin/bash |
---|
2 | # |
---|
3 | # file shsetup |
---|
4 | # ======= |
---|
5 | # |
---|
6 | # This file must be 'source'd in a bash shell before running SH. |
---|
7 | # Please edit the beginning of the file to match your environment. |
---|
8 | |
---|
9 | # |
---|
10 | # |
---|
11 | # root path |
---|
12 | # --------- |
---|
13 | # |
---|
14 | # root path for SH (this is where the directories 'source', 'util', |
---|
15 | # 'help', etc ..., are) |
---|
16 | # |
---|
17 | shcroot=##ROOTPATH## |
---|
18 | userroot=##USERROOT## |
---|
19 | |
---|
20 | # |
---|
21 | # |
---|
22 | # compiler switches |
---|
23 | # ----------------- |
---|
24 | # |
---|
25 | # If you have to recompile the sources set appropriate values to these |
---|
26 | # environment variables. |
---|
27 | # SH_COMPILER : The ANSI compiler (like gcc or acc, others I didn't check) |
---|
28 | # The ordinary cc of Sun-Solaris-1 does NOT work. |
---|
29 | # SH_CCOPTIONS : Options passed to the compiler. Debugging (-g) is enabled |
---|
30 | # by default. Don't use '-DSH_SETUP_GRF' at other places |
---|
31 | # than SZGRF observatory. If you want to have compiled the |
---|
32 | # AH-interface specify '-DSH_SETUP_AH'. But then you |
---|
33 | # need (a) to specify also '-lahio' on SH_LINKLIBS and (b) |
---|
34 | # an appropriate AH-library (libahio.a) in $SH_LIB. The |
---|
35 | # one provided is working only on Sun Solaris-1 (SunOS 4.1.3). |
---|
36 | # SH_TEXTEDIT : Call to (graphical) text editor, like '##EDITOR##' in OpenLook |
---|
37 | # or 'vuepad' in HP-UX. |
---|
38 | # SH_LINKLIBS : Additional libraries linked to the executables. '-lahio' |
---|
39 | # is required if you have specified '-DSH_SETUP_AH' on |
---|
40 | # SH_CCOPTIONS (see above). |
---|
41 | # SH_MOTIFLIBS : extra libraries for OSF/Motif |
---|
42 | # SH_LINKOPTIONS: Additional library paths |
---|
43 | # SH_RANLIB : ranlib-program for libraries. Usually 'ranlib' on |
---|
44 | # Sun-Solaris-1 and 'touch' (which means: do nothing) on |
---|
45 | # Sun-Solaris-2. |
---|
46 | # |
---|
47 | # some example settings: |
---|
48 | # |
---|
49 | # (1) version for Solaris-2 with gcc compiler, with AH (tested at SZGRF) |
---|
50 | #OS-sol2 export SH_COMPILER=gcc |
---|
51 | #OS-sol2 export SH_CCOPTIONS='-g -DSH_SETUP_AH -DSH_SETUP_SZGRF -I/usr/dt/include -I/usr/openwin/share/include' |
---|
52 | #OS-sol2 export SH_TEXTEDIT=##EDITOR## |
---|
53 | #OS-sol2 export SH_LINKLIBS='-lahio -lnsl' |
---|
54 | #OS-sol2 export SH_MOTIFLIBS='' |
---|
55 | #OS-sol2 export SH_LINKOPTIONS='-L/usr/dt/lib' |
---|
56 | #OS-sol2 export SH_RANLIB=touch |
---|
57 | # |
---|
58 | # (2) version for Linux with gcc compiler (tested at SZGRF) |
---|
59 | #OS-linux export SH_COMPILER=gcc |
---|
60 | #OS-linux export SH_CCOPTIONS='-g -DSH_SETUP_LINUX -DSH_SETUP_AH -I/usr/X11R6/include' |
---|
61 | #OS-linux export SH_TEXTEDIT=##EDITOR## |
---|
62 | #OS-linux export SH_LINKLIBS='-lahio' |
---|
63 | #export SH_MOTIFLIBS='-lXp -lSM -lICE -lXpm -static' # static version |
---|
64 | #OS-linux export SH_MOTIFLIBS='-lICE -lSM -lXpm' # dynamic version |
---|
65 | #OS-linux export SH_LINKOPTIONS='-L/usr/X11R6/lib' |
---|
66 | #OS-linux export SH_RANLIB=ranlib |
---|
67 | |
---|
68 | |
---|
69 | # ----------------------------------------------------------------------------- |
---|
70 | # Do not edit beyond this point (at least try to) |
---|
71 | # ----------------------------------------------------------------------------- |
---|
72 | |
---|
73 | |
---|
74 | # paths |
---|
75 | export SH_ROOT=$shcroot |
---|
76 | export SH_USERROOT=$userroot |
---|
77 | export SH_HELP=$shcroot/help/ |
---|
78 | export SH_COMMAND=$shcroot/command/ |
---|
79 | export SH_COMMAND2=$shcroot/command/bmp/ |
---|
80 | export SH_FILTER=$shcroot/filter/ |
---|
81 | export SH_GLOBALS=$shcroot/globals/ |
---|
82 | export SH_ERRORS=$shcroot/errors/ |
---|
83 | export SH_INPUTS=$shcroot/inputs/ |
---|
84 | export SH_UTIL=$shcroot/util/ |
---|
85 | export SH_PDE=$shcroot/inputs/pde/ |
---|
86 | export SH_SOURCE=$shcroot/source/ |
---|
87 | export SH_EXTPROG=$shcroot/util/ |
---|
88 | export SH_LIB=$shcroot/lib/ |
---|
89 | [ -d $SH_USERROOT ] || mkdir $SH_USERROOT |
---|
90 | if [ ! -d $SH_USERROOT/shscratch ] ; then |
---|
91 | echo 'creating directory $SH_USERROOT/shscratch' |
---|
92 | mkdir $SH_USERROOT/shscratch |
---|
93 | fi |
---|
94 | if [ ! -d $SH_USERROOT/private ] ; then |
---|
95 | echo 'creating directory $SH_USERROOT/private' |
---|
96 | mkdir $SH_USERROOT/private |
---|
97 | fi |
---|
98 | export SH_SCRATCH=$SH_USERROOT/shscratch/ |
---|
99 | export SH_USERDIR=$SH_USERROOT/private/ |
---|
100 | alias SH=$shcroot/shc_world |
---|
101 | alias SH_N=$shcroot/shc |
---|
102 | |
---|
103 | # |
---|
104 | # all following instructions are not needed for the command line version SH |
---|
105 | # ------------------------------------------------------------------------- |
---|
106 | # |
---|
107 | # for SHM |
---|
108 | # |
---|
109 | alias SHM='(export UIDPATH $shcroot/source/motif/shm_world.uid; $shcroot/source/motif/shm_world)' |
---|
110 | alias SHM_N='(export UIDPATH $shcroot/source/motif/shm.uid; $shcroot/source/motif/shm)' |
---|
111 | # |
---|
112 | # for utility programs of SHM |
---|
113 | # |
---|
114 | export SH_LOCSAT=##LOCSATPATH## |
---|
115 | export SH_LOCSAT_EXEC=$SH_UTIL/LocSAT |
---|
116 | # |
---|
117 | # for SEED software |
---|
118 | # |
---|
119 | export SEED_INPUTS=$SH_SOURCE/seed_io/inputs |
---|
120 | export SEED_PROG=$SH_SOURCE/seed_io |
---|
121 | alias sfdlist=$SEED_PROG/sfdlist.csh |
---|
122 | alias sfdlist_l=$SEED_PROG/sfdlist_l.csh |
---|
123 | alias sfd_extract_times=$SEED_PROG/sfd_extract_times |
---|
124 | alias seed_tape=$SEED_PROG/seed_tape |
---|
125 | alias seed_gaps=$SEED_PROG/seedgaps |
---|