#!/bin/bash
# See https://at.projects.genivi.org/wiki/x/64Kw

# set -x
set -e

REMOTEDIR=http://docs.projects.genivi.org/gdp_files/v9/
FILELIST=md5sum-gdp-v9beta.txt

while IFS='' read -r line || [[ -n "$line" ]]; do
    # echo DEBUG: line=$line
    [[ $line = \#* ]] && continue
    f=$(echo $line | cut -d' ' -f2)
    echo DEBUG: f=$f
    if [ ! -e $f ]; then
        echo INFO: Fetching $f from ${REMOTEDIR}
        wget ${REMOTEDIR}/$f
    fi
done < ${FILELIST}
md5sum -c ${FILELIST}

# EOF

#!/bin/bash
# See https://at.projects.genivi.org/wiki/x/64Kw

# set -x
set -e

REMOTEDIR=http://docs.projects.genivi.org/gdp_files/v9
FILELIST=md5sum-gdp-v9beta.txt

while IFS='' read -r line || [[ -n "$line" ]]; do
    # echo DEBUG: line=$line
    [[ $line = \#* ]] && continue
    f=$(echo $line | cut -d' ' -f2)
    # echo DEBUG: f=$f
    if [ -e $f ]; then
        echo "INFO: File $f exists - skipping"
    else
        echo "INFO: Fetching $f from ${REMOTEDIR}"
        wget ${REMOTEDIR}/$f
    fi
done < ${FILELIST}
echo "INFO: Verifying MD5SUMs in ${FILELIST}"
md5sum -c ${FILELIST}

# EOF

Remove debug messages, add info
Remove debug messages, add info

Signed-off-by: Gianpaolo Macario <f8885408b8c3d931b330bae3c3a28a3af912c463@gmail.com>
