From 6b00779440cdbfaeb1cccc063c6255cf8ba7284c Mon Sep 17 00:00:00 2001 From: Toni Erdmann Date: Mon, 11 Nov 2019 21:25:56 +0100 Subject: [PATCH] fix issue #85 no longer use PTNA_RESULT_HTML = results/xx/index.html with sed --- bin/ptna-network.sh | 46 +++------------------------------------------ 1 file changed, 3 insertions(+), 43 deletions(-) diff --git a/bin/ptna-network.sh b/bin/ptna-network.sh index 1ce8c64..46c3fb0 100755 --- a/bin/ptna-network.sh +++ b/bin/ptna-network.sh @@ -7,13 +7,11 @@ if [ -z "$PTNA_TARGET_LOC" -o \ -z "$PTNA_RESULTS_LOC" -o \ -z "$PTNA_NETWORKS_LOC" -o \ - -z "$PTNA_RESULTS_HTML" -o \ -z "$PTNA_WORK_LOC" ] then echo " ...unset global variable(s)" [ -z "$PTNA_TARGET_LOC" ] && echo "Please specify: PTNA_TARGET_LOC as environment variable outside the tools" [ -z "$PTNA_RESULTS_LOC" ] && echo "Please specify: PTNA_RESULTS_LOC as environment variable outside the tools" - [ -z "$PTNA_RESULTS_HTML" ] && echo "Please specify: PTNA_RESULTS_HTML as environment variable outside the tools" [ -z "$PTNA_NETWORKS_LOC" ] && echo "Please specify: PTNA_NETWORKS_LOC as environment variable outside the tools" [ -z "$PTNA_WORK_LOC" ] && echo "Please specify: PTNA_WORK_LOC as environment variable outside the tools" echo "... terminating" @@ -90,11 +88,6 @@ SUB_DIR=${SUB_DIR/-//} # SUB_DIR=FR/IDF/entre-seine-et-foret --> changed into in SUB_DIR=FR/IDF SUB_DIR="${SUB_DIR%/*}" -# on the web, the overview results HTML file might be -# $PTNA_TARGET_LOC/$PTNA_RESULTS_LOC/$COUNTRY_DIR/$PTNA_RESULTS_HTML or -# $PTNA_TARGET_LOC/$PTNA_RESULTS_LOC/PTNA_RESULTS_HTML -# check in this order, which one exists - COUNTRY_DIR="${PREFIX%%-*}" WORK_LOC="$PTNA_WORK_LOC/$SUB_DIR" @@ -308,16 +301,6 @@ if [ "$updateresult" = "true" ] then RESULTS_LOC="$PTNA_TARGET_LOC/$PTNA_RESULTS_LOC/$SUB_DIR" - if [ -f "$PTNA_TARGET_LOC/$PTNA_RESULTS_LOC/$COUNTRY_DIR/$PTNA_RESULTS_HTML" ] - then - RESULTS_HTML="$PTNA_TARGET_LOC/$PTNA_RESULTS_LOC/$COUNTRY_DIR/$PTNA_RESULTS_HTML" - elif [ -f $PTNA_TARGET_LOC/$PTNA_RESULTS_LOC/$PTNA_RESULTS_HTML ] - then - RESULTS_HTML="$PTNA_TARGET_LOC/$PTNA_RESULTS_LOC/$PTNA_RESULTS_HTML" - else - RESULTS_HTML="" - fi - echo "REGION_NAME=$PTNA_WWW_REGION_NAME" > $WORK_LOC/$DETAILS_FILE echo "REGION_LINK=$PTNA_WWW_REGION_LINK" >> $WORK_LOC/$DETAILS_FILE echo "NETWORK_NAME=$PTNA_WWW_NETWORK_NAME" >> $WORK_LOC/$DETAILS_FILE @@ -409,30 +392,14 @@ then echo $(date "+%Y-%m-%d %H:%M:%S") "Copying '$WORK_LOC/$DIFF_HTML_FILE' to '$RESULTS_LOC'" cp $WORK_LOC/$DIFF_HTML_FILE $RESULTS_LOC - if [ -n "$RESULTS_HTML" ] - then - echo $(date "+%Y-%m-%d %H:%M:%S") "Updating results HTML file '$RESULTS_HTML'" - - sed -i -e "s/^\(.*$PREFIX-datadate.*\)