testing/release/common/download_builds.sh

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 # This Source Code Form is subject to the terms of the Mozilla Public
     2 # License, v. 2.0. If a copy of the MPL was not distributed with this
     3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
     5 download_builds() {
     6   # cleanup
     7   mkdir -p downloads/
     8   rm -rf downloads/*
    10   source_url="$1"
    11   target_url="$2"
    13   if [ -z "$source_url" ] || [ -z "$target_url" ]
    14   then
    15     "download_builds usage: <source_url> <target_url>"
    16     exit 1
    17   fi
    19   for url in "$source_url" "$target_url"
    20     do
    21     source_file=`basename "$url"`
    22     if [ -f "$source_file" ]; then rm "$source_file"; fi
    23     #PARAMS="--user=user --password=pass"
    24     cd downloads 
    25     if [ -f "$source_file" ]; then rm "$source_file"; fi
    26     wget --no-check-certificate -nv $PARAMS "$url" 2>&1
    27     if [ $? != 0 ]; then
    28       echo "FAIL: Could not download source $source_file from $url"
    29       echo "skipping.."
    30       cd ../
    31       continue
    32     fi
    33     cd ../
    34   done
    35 }

mercurial