Changeset 250
- Timestamp:
- 09/12/12 18:44:56 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bibliolocean/src/genaeres.sh
r242 r250 34 34 # 35 35 # $URL$ 36 # 37 # - fplod 20120912T124959Z cratos.locean-ipsl.upmc.fr (Linux) 38 # 39 # * homogenize log message with command and LINENO 40 # * get info from aeres subset instead of the whole biblio (ie year limit) 41 # * produce a RTF file by team 36 42 # 37 43 # - fplod 20120706T101813Z cratos (Linux) … … 63 69 case "${system}" in 64 70 AIX|IRIX64) 65 echo "${command} : www : no specific posix checking"71 echo "${command} : ${LINENO} : www : no specific posix checking" 66 72 ;; 67 73 *) … … 87 93 if [ ${status} -ne 0 ] 88 94 then 89 echo "${command} : eee : ${tool} unavailable" >&295 echo "${command} : ${LINENO} : eee : ${tool} unavailable" >&2 90 96 exit 1 91 97 fi … … 99 105 if [ ${status} -ne 0 ] 100 106 then 101 echo "${command} : eee : ${tool} unavailable" >&2107 echo "${command} : ${LINENO} : eee : ${tool} unavailable" >&2 102 108 exit 1 103 109 fi … … 193 199 if [ ${jabref_status} -ne 0 ] 194 200 then 195 echo "${command} : eee : pb with jabref export ${format}"201 echo "${command} : ${LINENO} : eee : pb with jabref export ${format}" 196 202 exit 1 197 203 fi … … 204 210 while [ ${iteam} -le ${nbteam} ] 205 211 do 206 echo "${ LINENO} : iii: team = ${list_team_bibtool[${iteam}]}"212 echo "${command} : ${LINENO} : iii : team = ${list_team_bibtool[${iteam}]}" 207 213 fteam=${tmpdir}/${list_team_title[${iteam}]}.bib 208 214 rm ${fteam} 2> /dev/null 209 bibtool_command="bibtool -- 'select={aeresteam \"${list_team_bibtool[${iteam}]}\"}' ${biblioref full} -o ${fteam}"215 bibtool_command="bibtool -- 'select={aeresteam \"${list_team_bibtool[${iteam}]}\"}' ${biblioref} -o ${fteam}" 210 216 eval ${bibtool_command} 211 217 unset bibtool_command … … 213 219 if [ ${nbatteam} -ge 2 ] 214 220 then 215 echo " iii : $((${nbatteam} - 1)) ref for aeresteam ${list_team_title[${iteam}]}"221 echo "${command} : ${LINENO} : iii : $((${nbatteam} - 1)) ref for aeresteam ${list_team_title[${iteam}]}" 216 222 # generation one HTML file style ${format} 217 223 format=locean_tablerefsabsbibsort … … 224 230 if [ ${jabref_status} -ne 0 ] 225 231 then 226 echo "${command} : eee : pb with jabref export ${format}" 232 echo "${command} : ${LINENO} : eee : pb with jabref export ${format}" 233 exit 1 234 fi 235 # generation one RTF file 236 ofteam=${dirwww}/$(basename ${fteam} .bib).rtf 237 rm ${ofteam} 2> /dev/null 238 jabref_rtf \ 239 ${PROJECT}/../branches/bibliolocean/src/jabref.preferences.xml \ 240 ${fteam} ${ofteam} 241 jabref_status=${?} 242 if [ ${jabref_status} -ne 0 ] 243 then 244 echo "${command} : ${LINENO} : eee : pb with jabref rtf team" 227 245 exit 1 228 246 fi … … 231 249 for iyear in ${list_year} 232 250 do 233 echo "${ LINENO} : iii: year = ${iyear}"251 echo "${command} : ${LINENO} : iii : year = ${iyear}" 234 252 fteamyear=${tmpdir}/$(basename ${fteam} .bib)_${iyear}.bib 235 253 rm ${fteamyear} 2> /dev/null … … 241 259 if [ ${nbatteamyear} -ge 2 ] 242 260 then 243 echo " iii : $((${nbatteamyear} - 1)) ref for aeresteam ${list_team_title[${iteam}]} and year ${iyear}"261 echo "${command} : ${LINENO} : iii : $((${nbatteamyear} - 1)) ref for aeresteam ${list_team_title[${iteam}]} and year ${iyear}" 244 262 list_fteamyear="${list_fteamyear} ${fteamyear}" 245 263 else 246 echo " www : no ref for aeresteam ${list_team_title[${iteam}]} and year ${iyear}"264 echo "${command} : ${LINENO} : www : no ref for aeresteam ${list_team_title[${iteam}]} and year ${iyear}" 247 265 fi 248 266 unset nbatteamyear … … 250 268 unset iyear 251 269 else 252 echo " www : no ref for aeresteam ${list_team_title[${iteam}]}"270 echo "${command} : ${LINENO} : www : no ref for aeresteam ${list_team_title[${iteam}]}" 253 271 fi 254 272 unset nbatteam … … 269 287 for aerestype in ${list_aerestype} 270 288 do 271 echo "${ LINENO} : iii: aerestype = ${aerestype}"289 echo "${command} : ${LINENO} : iii : aerestype = ${aerestype}" 272 290 for fteamyear in ${list_fteamyear} 273 291 do 274 echo "${ LINENO} : iii: fteamyear = ${fteamyear}"292 echo "${command} : ${LINENO} : iii : fteamyear = ${fteamyear}" 275 293 #++ add header 276 294 fteamyeartype=${tmpdir}/$(basename ${fteamyear} .bib)_${aerestype}.bib … … 283 301 if [ ${nbatteamyeartype} -ge 2 ] 284 302 then 285 echo " iii : $((${nbatteamyeartype} - 1)) ref type ${aerestype} in ${fteamyear}"303 echo "${command} : ${LINENO} : iii : $((${nbatteamyeartype} - 1)) ref type ${aerestype} in ${fteamyear}" 286 304 ofteamyeartype=${dirwww}/$(basename ${fteamyeartype} .bib).rtf 287 305 rm ${ofteamyeartype} 2> /dev/null … … 291 309 # ++ test si ok 292 310 else 293 echo " www : no ref type ${aerestype} in ${fteamyear}"311 echo "${command} : ${LINENO} : www : no ref type ${aerestype} in ${fteamyear}" 294 312 fi 295 313 unset nbatteamyeartype … … 321 339 if [ ${jabref_status} -ne 0 ] 322 340 then 323 echo "${command} : eee : pb with jabref export ${format}"341 echo "${command} : ${LINENO} : eee : pb with jabref export ${format}" 324 342 exit 1 325 343 fi 326 344 #++ else 327 #++ echo "${command} : iii : no reference for author ${team}"345 #++ echo "${command} : ${LINENO} : iii : no reference for author ${team}" 328 346 #++ fi 329 347 iauthor=$(( ${iauthor} + 1 )) … … 334 352 fteam=${tmpdir}/phybiocar.bib 335 353 rm ${fteam} 2> /dev/null 336 bibtool_command="bibtool -- 'select={aeresteam \"phybiocar\"}' ${biblioref full} -o ${fteam}"354 bibtool_command="bibtool -- 'select={aeresteam \"phybiocar\"}' ${biblioref} -o ${fteam}" 337 355 eval ${bibtool_command} 338 356 unset bibtool_command … … 340 358 if [ ${nbatteam} -ge 2 ] 341 359 then 342 echo " iii : $((${nbatteam} - 1)) ref for aeresteam phybiocar}"360 echo "${command} : ${LINENO} : iii : $((${nbatteam} - 1)) ref for aeresteam phybiocar in ${biblioref}" 343 361 # generation one HTML file style ${format} 344 362 format=locean_tablerefsabsbibsort … … 351 369 if [ ${jabref_status} -ne 0 ] 352 370 then 353 echo "${command} : eee : pb with jabref export ${format}"371 echo "${command} : ${LINENO} : eee : pb with jabref export ${format}" 354 372 exit 1 355 373 fi … … 359 377 for theme in ${list_theme} 360 378 do 361 echo "${ LINENO} : iii: theme = ${theme}"379 echo "${command} : ${LINENO} : iii : theme = ${theme}" 362 380 fteamtheme=${tmpdir}/$(basename ${fteam} .bib)_${theme}.bib 363 381 rm ${fteamtheme} 2> /dev/null … … 369 387 if [ ${nbatteamtheme} -ge 2 ] 370 388 then 371 echo " iii : $((${nbatteamtheme} - 1)) ref for aeresteam phybiocar and theme ${theme}"389 echo "${command} : ${LINENO} : iii : $((${nbatteamtheme} - 1)) ref for aeresteam phybiocar and theme ${theme} in ${fteam}" 372 390 list_fteamtheme="${list_fteamtheme} ${fteamtheme}" 373 391 else 374 echo " www : no ref for aeresteam phybiocar and theme ${theme}"392 echo "${command} : ${LINENO} : www : no ref for aeresteam phybiocar and theme ${theme}" 375 393 fi 376 394 unset nbatteamtheme … … 380 398 for iyear in ${list_year} 381 399 do 382 echo "${ LINENO} : iii: year = ${iyear}"400 echo "${command} : ${LINENO} : iii : year = ${iyear}" 383 401 fteamthemeyear=${tmpdir}/$(basename ${fteam} .bib)_${theme}_${iyear}.bib 384 402 rm ${fteamthemeyear} 2> /dev/null … … 390 408 if [ ${nbatteamthemeyear} -ge 2 ] 391 409 then 392 echo " iii : $((${nbatteamthemeyear} - 1)) ref for aeresteam phybiocar and theme ${theme} and year ${iyear}"410 echo "${command} : ${LINENO} : iii : $((${nbatteamthemeyear} - 1)) ref for aeresteam phybiocar and theme ${theme} and year ${iyear}" 393 411 list_fteamthemeyear="${list_fteamthemeyear} ${fteamthemeyear}" 394 412 else 395 echo " www : no ref for aeresteam phybiocar and theme ${theme} and year ${iyear}"413 echo "${command} : ${LINENO} : www : no ref for aeresteam phybiocar and theme ${theme} and year ${iyear}" 396 414 fi 397 read a415 #read a 398 416 unset nbatteamthemeyear 399 417 done # end of year loop … … 401 419 unset iyear 402 420 else 403 echo " www : no ref for aeresteam phybiocar]}"421 echo "${command} : ${LINENO} : www : no ref for aeresteam phybiocar]" 404 422 fi 405 423 unset list_year … … 414 432 for aerestype in ${list_aerestype} 415 433 do 416 echo "${ LINENO} : iii: aerestype = ${aerestype}"434 echo "${command} : ${LINENO} : iii : aerestype = ${aerestype}" 417 435 for fteamthemeyear in ${list_fteamthemeyear} 418 436 do 419 echo "${ LINENO} : iii: fteamthemeyear = ${fteamthemeyear}"437 echo "${command} : ${LINENO} : iii : fteamthemeyear = ${fteamthemeyear}" 420 438 #++ add header 421 439 fteamthemeyeartype=${tmpdir}/$(basename ${fteamthemeyear} .bib)_${aerestype}.bib … … 428 446 if [ ${nbatteamthemeyeartype} -ge 2 ] 429 447 then 430 echo " iii : $((${nbatteamthemeyeartype} - 1)) ref type ${aerestype} in ${fteamthemeyear}"448 echo "${command} : ${LINENO} : iii : $((${nbatteamthemeyeartype} - 1)) ref type ${aerestype} in ${fteamthemeyear}" 431 449 ofteamthemeyeartype=${dirwww}/$(basename ${fteamthemeyeartype} .bib).rtf 432 450 rm ${ofteamthemeyeartype} 2> /dev/null … … 436 454 # ++ test si ok 437 455 else 438 echo " www : no ref type ${aerestype} in ${fteamthemeyear}"456 echo "${command} : ${LINENO} : www : no ref type ${aerestype} in ${fteamthemeyear}" 439 457 fi 440 458 unset nbatteamthemeyeartype
Note: See TracChangeset
for help on using the changeset viewer.