Changeset 343 for SH_SHM/trunk
- Timestamp:
- 03/10/2011 01:47:22 PM (13 years ago)
- Location:
- SH_SHM/trunk/setup
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
SH_SHM/trunk/setup/SHM-install.csh
r340 r343 25 25 if (! -w $dstpath) then 26 26 echo "$0 : cannot write to installation path $dstpath. Abort." 27 exit 27 exit 1 28 28 endif 29 29 … … 73 73 if (! -e "$res") then 74 74 echo "Program $p not found in search path. Please add." 75 exit 75 exit 2 76 76 endif 77 77 end … … 95 95 set cmd="$<" 96 96 97 if ("$cmd" == "q") exit 97 if ("$cmd" == "q") exit 99 98 98 if ("$cmd" == "r") then 99 99 if ("$displ_res" == "xga") then … … 156 156 else 157 157 echo "$0 : sorry, this operating system is not supported" 158 exit 158 exit 3 159 159 endif 160 160 set locsatpath=$dstpath/sh/util/locsat … … 167 167 if ($plth > 25) then 168 168 echo "$0 : cannot find short locsat path. Abort." 169 exit 169 exit 4 170 170 endif 171 171 endif … … 209 209 if (! -e $origsetup) then 210 210 echo "Installation program error. Sorry." 211 exit 211 exit 5 212 212 endif 213 213 set thissetup=$dstpath/sh/inputs/shm-config.txt 214 if (-e $thissetup) \mv $thissetup $dstpath/sh/inputs/shm-config.txt.yours 214 if (-e $thissetup) then 215 \mv $thissetup $dstpath/sh/inputs/shm-config.txt.yours 216 echo "A backup of your shm-config.txt has been saved under:" 217 echo $dstpath/sh/inputs/shm-config.txt.yours 218 endif 215 219 sed "s@##EDITOR##@$editor@" $origsetup > $thissetup 216 220 -
SH_SHM/trunk/setup/makerelease.sh
r330 r343 56 56 cat decompress.sh > /tmp/SHM-install.sh 57 57 base64 $TMPDIR/SHM.tar.gz >> /tmp/SHM-install.sh 58 chmod 755 /tmp/SHM-install.sh 58 59 } 59 60 -
SH_SHM/trunk/setup/setup.py
r340 r343 33 33 34 34 def banner(): 35 print "="*7 835 print "="*70 36 36 print " Setup program v0.1 for Seismic Handler (SH/SHM)" 37 print "="*7 837 print "="*70 38 38 print "\n This piece of software will try to setup the included source code.\n" 39 39 40 def download(target, pkg ):40 def download(target, pkg, dbg): 41 41 print "Downloading %s..." % pkg 42 os.system("wget -q -P %s %s" % (target, downloads[pkg])) 42 43 verbose = dbg and "" or "-q " 44 45 if os.system("wget %s-P %s %s" % (verbose, target, downloads[pkg])): 46 abort("Cannot download %s. Exit here." % pkg) 43 47 44 48 def setup(**kwargs): … … 83 87 84 88 copy(os.path.join(data["pwd"], ".."), os.path.join(target, "sh"), dbg) 85 download(target, "locsat" )86 download(target, "fk" )89 download(target, "locsat", dbg) 90 download(target, "fk", dbg) 87 91 88 install(target) 89 customize(target) 92 exitcode = install(target, dbg) 93 if exitcode == 99: 94 abort("Installation aborted.") 95 elif exitcode: 96 abort("Installation errors occured. Please check output.") 90 97 91 def customize(target): 98 customize(target, dbg) 99 100 def customize(target, dbg): 92 101 """ 93 102 Offers usage of new configuration files. … … 97 106 98 107 flist = ["STATINF.DAT", "sensitivities.txt", "filter_lookup.txt"] 99 100 print "\nA backup of your shm-config.txt has been saved under"101 print " %s/sh/inputs/shm-config.txt.yours" % target102 108 103 109 print "\nSeismic Handler comes with updated station configuration files." … … 117 123 os.system("cp %s %s" % (tname+".dist", tname)) 118 124 119 def install(target): 120 os.system(os.path.join(target, "sh/setup/SHM-install.csh %s" % target)) 125 def install(target, dbg): 126 exitcode = \ 127 os.system(os.path.join(target, "sh/setup/SHM-install.csh %s" % target)) 128 129 return exitcode >> 8 121 130 122 131 def copy(src, trt, dbg=False):
Note: See TracChangeset
for help on using the changeset viewer.