#!/bin/sh

# Project:       GeoTIFF Uploader
# Author:        $Author: stripodi $ (Terradue Srl)
# Last update:   $Date: 2011-09-02 11:20:38 +0200 (Fri, 02 Sep 2011) $
# Element:       ify web portal
# Context:       services/gtu
# Name:          service.js
# Version:       1.0.1-4.4.0-126580 (UNKNOWN_BRANCH@r??????; 2017-04-29 01:01:04+0000)
# Description:   Service descriptor for gtu. 
#
# This document is the property of Terradue and contains information directly
# resulting from knowledge and experience of Terradue.
# Any changes to this code is forbidden without written consent from Terradue Srl
#
# Contact: info@terradue.com

logThis "INFO" "Starting preparation pilot  ..." 1>&2

if [ -e jobinputfiles ]
then
    cat jobinputfiles | queryCatalogue "$CE" catalogue.results
    res=$?
    if [ $res != 0 ]
    then 
        logThis "ERROR" "queryCatalogue returned $res. Processing aborted" 
        exit 1
    fi
    flags=" -w catalogue.results"
else
    logThis "ERROR" "Empty jobinputfiles file"
    exit 2
fi

install -w params $flags
