Changeset 339 for SH_SHM/trunk
- Timestamp:
- 03/03/2011 05:03:24 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
SH_SHM/trunk/setup/setup.py
r338 r339 1 import os.path 1 2 #! /usr/bin/env python 2 3 … … 87 88 88 89 install(target) 90 customize(target) 91 92 def customize(target): 93 """ 94 Offers usage of new configuration files. 95 96 Save user defined configuration files, if choosen. 97 """ 98 99 flist = ["STATINF.DAT", "sensitivities.txt", "filter_lookup.txt"] 100 101 print "A backup of your shm-config.txt has been saved under" 102 print " %s/sh/inputs/shm-config.txt.yours" % target 103 104 print "Seismic Handler comes with updated station configuration files." 105 a = raw_input("Do you want to use them (backup will be saved) [Yn]? ") 106 107 if a == "n": 108 print "Please check the following files manually (sh/inputs):" 109 for f in flist: 110 print f, "vs.", f+".dist" 111 return 112 113 for f in flist: 114 tname = os.pathjoin(target, f) 115 if os.path.exists(tname): 116 print "Backing up %s... (to %s)" % (f, f+".yours") 117 os.system("cp %s %s" % (tname, tname+".yours")) 118 os.system("cp %s %s" % (tname+".dist", tname)) 89 119 90 120 def install(target):
Note: See TracChangeset
for help on using the changeset viewer.