To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 25a2648c authored by Reto Da Forno's avatar Reto Da Forno

shell tool updated

parent 69e7b068
......@@ -16,6 +16,8 @@
# -p: get a list of the available platforms
# -h: display help
#
# For the commands -g and -f, the download directory can be specified as an additional argument.
#
# Your FlockLab login credentials need to be stored in .flocklabauth in your home directory as follows:
# USER=[your_username]
# PASSWORD=[your_password]
......@@ -23,9 +25,9 @@
# If you want to be able to download your test results via webdav (-f), you need to install the client 'cadaver'.
# ------------------------------
DEST=/tmp # destination directory
EXTRACT=1 # extract results?
TESTCONFIG=0 # also download XML test config?
DEST=${3:-/tmp/flocklab} # destination directory (if not specified, the default is used: /tmp/flocklab)
EXTRACT=1 # extract results?
TESTCONFIG=0 # also download XML test config?
SERVER_URL=https://www.flocklab.ethz.ch/user
CURL_PARAMS='-sS -4'
FLAUTH_FILE=.flocklabauth
......@@ -69,6 +71,7 @@ OPTIONS:
-f <testid>: fetch test results (via webdav)
-o <platform>: get a list of currently available observers
-p: get a list of available platforms
-h: display this help page
EOF
}
......@@ -231,6 +234,10 @@ do
;;
g)
echo "Fetching results for test $OPTARG ..."
if [ ! -d $DEST ]
then
mkdir $DEST
fi
OUTFILE=$DEST/$OPTARG.tar.gz
RESPONSE=`curl $CURL_PARAMS -X POST -H "Content-Type: application/x-www-form-urlencoded" -d "testid=${OPTARG}&query=get&username=${USER}&password=${PASSWORD}" -o $OUTFILE $SERVER_URL/result_download_archive.php`
FILESIZE=`stat -c "%s" $OUTFILE`
......
Markdown is supported
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