Merge "Log missed tarballs"
This commit is contained in:
commit
2725915f96
@ -24,22 +24,30 @@ fi
|
||||
# - Puppet hosted under "downloads/puppet" output directory.
|
||||
# to be populated under $MY_REPO/addons/wr-cgcs/layers/cgcs/downloads/puppet
|
||||
|
||||
output_main="output"
|
||||
logs_dir="$script_path/logs"
|
||||
output_main="$script_path/output"
|
||||
output_log="$logs_dir/log_download_tarball_missing.txt"
|
||||
output_path=$output_main/stx-r1/CentOS/pike
|
||||
output_tarball=$output_path/downloads
|
||||
output_puppet=$output_tarball/puppet
|
||||
|
||||
mkdir -p $output_tarball
|
||||
mkdir -p $output_puppet
|
||||
if [ ! -d "$logs_dir" ]; then
|
||||
mkdir "$logs_dir"
|
||||
fi
|
||||
|
||||
# Download function using wget command
|
||||
|
||||
download_package() {
|
||||
wget --spider $1
|
||||
if [[ $? != 0 ]]; then
|
||||
if [ $? != 0 ]; then
|
||||
echo "$1 is broken"
|
||||
else
|
||||
wget -t 5 --wait=15 $1
|
||||
if [ $? != 0 ]; then
|
||||
echo "$1" > "$output_log"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
@ -185,7 +193,8 @@ for line in $(cat $tarball_file); do
|
||||
fi
|
||||
popd
|
||||
else
|
||||
echo "Error: Failed to download $tarball_url"
|
||||
echo "Error: Failed to download $tarball_url" 1>&2
|
||||
echo "$tarball_url" > "$output_log"
|
||||
fi
|
||||
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user