Changeset 203 for trunk/src/get_pirata_netcdf.sh
- Timestamp:
- 02/11/14 18:41:24 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/get_pirata_netcdf.sh
r199 r203 13 13 # ======== 14 14 # 15 # ::16 # 17 # $get_pirata_netcdf.sh15 # .. code-block:: bash 16 # 17 # get_pirata_netcdf.sh 18 18 # 19 19 # DESCRIPTION … … 66 66 # ======== 67 67 # 68 # You don't have any PIRATA reference data, you just have to run this tool :: 69 # 70 # $ get_pirata_netcdf.sh 71 # 72 # And look at log file with :: 73 # 74 # $ tlogd.sh get_pirata_netcdf 68 # You don't have any PIRATA reference data, you just have to run this tool : 69 # 70 # .. code-block:: bash 71 # 72 # get_pirata_netcdf.sh 73 # 74 # And look at log file with : 75 # 76 # .. code-block:: bash 77 # 78 # tlogd.sh get_pirata_netcdf 75 79 # 76 80 # and of course on files in ${PROJECT_ID}. … … 112 116 system=$(uname) 113 117 case "${system}" in 114 AIX|IRIX64)115 echo "www : no specific posix checking"116 ;;117 *)118 set -o posix119 ;;118 AIX|IRIX64) 119 echo "www : no specific posix checking" 120 ;; 121 *) 122 set -o posix 123 ;; 120 124 esac 121 125 unset system … … 141 145 if [ ${status} -ne 0 ] 142 146 then 143 echo "${command} : eee : tool ${tool} not found"144 exit 1147 echo "${command} : eee : tool ${tool} not found" 148 exit 1 145 149 fi 146 150 unset status … … 150 154 if [ "${PROJECT_LOG}" = "" ] 151 155 then 152 echo "${command} : eee : \${PROJECT_LOG} not defined"153 exit 1156 echo "${command} : eee : \${PROJECT_LOG} not defined" 157 exit 1 154 158 fi 155 159 # … … 157 161 if [ ! -d ${PROJECT_LOG} ] 158 162 then 159 echo "${command} : eee : ${PROJECT_LOG} not found"160 exit 1163 echo "${command} : eee : ${PROJECT_LOG} not found" 164 exit 1 161 165 fi 162 166 # … … 164 168 if [ ! -x ${PROJECT_LOG} ] 165 169 then 166 echo "${command} : eee : ${PROJECT_LOG} not reachable"167 exit 1170 echo "${command} : eee : ${PROJECT_LOG} not reachable" 171 exit 1 168 172 fi 169 173 # … … 171 175 if [ ! -w ${PROJECT_LOG} ] 172 176 then 173 echo "${command} : eee : ${PROJECT_LOG} not writable"174 exit 1177 echo "${command} : eee : ${PROJECT_LOG} not writable" 178 exit 1 175 179 fi 176 180 # … … 198 202 for site in ${sitelist} 199 203 do 200 for var in ${varlist}201 do202 list_url="${list_url} ${locref}/${var}${site}_dy.cdf"203 done204 for var in ${varlist} 205 do 206 list_url="${list_url} ${locref}/${var}${site}_dy.cdf" 207 done 204 208 done 205 209 unset site … … 212 216 for url in ${list_url} 213 217 do 214 file=${PROJECT_ID}/$(basename ${url})215 if [ ! -f ${file} ]216 then217 wget --tries=1 --no-verbose -P ${PROJECT_ID} \218 file=${PROJECT_ID}/$(basename ${url}) 219 if [ ! -f ${file} ] 220 then 221 wget --tries=1 --no-verbose -P ${PROJECT_ID} \ 218 222 --user=taopmelftp \ 219 223 --password=G10b@LCh@Ng3 \ 220 224 ${url} >> ${log} 2>&1 221 wget_status=${?}222 if [ ${wget_status} -ne 0 ]223 then224 echo "${command} : eee : ${url} not found" >> ${log} 2>&1225 # ++ exit 1226 else227 echo "${command} : iii : ${url} found" >> ${log} 2>&1228 fi229 unset wget_status230 else231 echo "iii : ${file} exists" >> ${log}232 fi225 wget_status=${?} 226 if [ ${wget_status} -ne 0 ] 227 then 228 echo "${command} : eee : ${url} not found" >> ${log} 2>&1 229 # ++ exit 1 230 else 231 echo "${command} : iii : ${url} found" >> ${log} 2>&1 232 fi 233 unset wget_status 234 else 235 echo "iii : ${file} exists" >> ${log} 236 fi 233 237 done 234 238 unset file
Note: See TracChangeset
for help on using the changeset viewer.