Improve error checking to handle a potential error case.
Change-Id: I8ac39a0c5c84f6b23ea60a5c8e6601be76bf6afc
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
cd "$sign_dir" || exit 1
echo "Fetching artifacts from $nexus_repo_url to $sign_dir..."
- wget --recursive --execute robots=off --no-parent --quiet \
- --no-host-directories --cut-dirs=3 \
- "$nexus_repo_url"
+ if ! wget -nv --recursive --execute robots=off --no-parent \
+ --no-host-directories --cut-dirs=3 \
+ "$nexus_repo_url"; then
+ echo "ERROR: Failed to download artifacts."
+ exit 1
+ fi
echo "Removing files that do not need to be cloned..."
remove_files=($(find . -type f -name "index.html" \