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.

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

mercurial