Commit 9c892810 authored by Cresson Remi's avatar Cresson Remi
Browse files

ENH: logging displays lists better

No related merge requests found
Showing with 7 additions and 9 deletions
+7 -9
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
########################################################################### ###########################################################################
function logging { function logging {
logstr="[$(date)] : $@" logstr="[$(date)] : $@"
echo $logstr echo "$logstr"
echo $logstr >> $LOG_FILE echo "$logstr" >> $LOG_FILE
} }
########################################################################### ###########################################################################
......
...@@ -77,12 +77,12 @@ for TILE in "${TILES[@]}"; ...@@ -77,12 +77,12 @@ for TILE in "${TILES[@]}";
EXISTING_PLIST=$(cat $COMPLETE_FILE | sed 's!.*/!!' | sed "s/${NDVI_SUFFIX}.tif//") EXISTING_PLIST=$(cat $COMPLETE_FILE | sed 's!.*/!!' | sed "s/${NDVI_SUFFIX}.tif//")
fi fi
logging "Remote products:" logging "Remote products:"
logging "$PLIST" logging "${PLIST[@]}"
logging "Already processed products:" logging "Already processed products:"
logging "$EXISTING_PLIST" logging "${EXISTING_PLIST[@]}"
logging "Products to download:" logging "Products to download:"
TODO_LIST=$(echo "$PLIST" | grep -Fxv "$EXISTING_PLIST") TODO_LIST=$(echo "$PLIST" | grep -Fxv "$EXISTING_PLIST")
logging "$TODO_LIST" logging "${TODO_LIST[@]}"
if [ -z "$TODO_LIST" ]; if [ -z "$TODO_LIST" ];
then then
...@@ -145,8 +145,6 @@ for TILE in "${TILES[@]}"; ...@@ -145,8 +145,6 @@ for TILE in "${TILES[@]}";
cd $MAIN_SCRIPTS_DIR cd $MAIN_SCRIPTS_DIR
find $DOWNLOAD_DIR -type f -iname "*.zip" -exec ./ProcessArchive.sh {} \; find $DOWNLOAD_DIR -type f -iname "*.zip" -exec ./ProcessArchive.sh {} \;
# clean # clean
DeleteDirectory $DOWNLOAD_DIR DeleteDirectory $DOWNLOAD_DIR
done # next tile done # next tile
...@@ -43,13 +43,13 @@ do ...@@ -43,13 +43,13 @@ do
IMAGES_FILENAMES_LIST=$(cat $CURRENT_TILE_LIST_FILENAME | sort) IMAGES_FILENAMES_LIST=$(cat $CURRENT_TILE_LIST_FILENAME | sort)
logging "Image list:" logging "Image list:"
logging "$IMAGES_FILENAMES_LIST" logging "${IMAGES_FILENAMES_LIST[@]}"
# Generates the dates ASCII file # Generates the dates ASCII file
# works on SENTINEL2 products # works on SENTINEL2 products
IMAGES_DATES_LIST=$(echo "$IMAGES_FILENAMES_LIST" | sed 's!.*/!!' | cut -f2 -d_ | cut -f1 -d-) IMAGES_DATES_LIST=$(echo "$IMAGES_FILENAMES_LIST" | sed 's!.*/!!' | cut -f2 -d_ | cut -f1 -d-)
logging "Dates list:" logging "Dates list:"
logging "$IMAGES_DATES_LIST" logging "${IMAGES_DATES_LIST[@]}"
# Output directory # Output directory
CURRENT_TILE_OUTPUT_DIR=${CURRENT_TILE_DIR}/${OUTPUT_DIRNAME} CURRENT_TILE_OUTPUT_DIR=${CURRENT_TILE_DIR}/${OUTPUT_DIRNAME}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment