Skip to content

Commit

Permalink
Fix wget -S spider result condition. See: https://gitlab.com/sc0ttj/P…
Browse files Browse the repository at this point in the history
  • Loading branch information
s243a committed Oct 16, 2019
1 parent b5d1483 commit 0ab77c8
Show file tree
Hide file tree
Showing 2 changed files with 7,790 additions and 1 deletion.
7 changes: 6 additions & 1 deletion woof-code/rootfs-packages/PKG/usr/sbin/pkg
Expand Up @@ -4453,9 +4453,14 @@ pkg_download(){ # download a pkg ($1) to WORKDIR FUNCLIST
[ "$sub_dir" != '' ] && DOWNLOAD_URL="`echo "$DOWNLOAD_URL"| sed -e "s@//${sub_dir}@/${sub_dir}@g" -e "s@${sub_dir}//@${sub_dir}/@g"`"
# exit if URL is not found (if we get a 404 back)
if [ -z "$DOWNLOAD_URL" -o "`wget -S --spider "$DOWNLOAD_URL" 2>&1 | grep -m1 'HTTP/1.1 404 Not Found'`" != '' ]; then
if [ -z "$DOWNLOAD_URL" ]; then
error "Package URL not found $DOWNLOAD_URL"
return 8
else
wget -S --spider "$DOWNLOAD_URL" || { \
error "Package URL not found $DOWNLOAD_URL"
return 8
}
fi
# we may be using multiple URLs, so each time we change URL,
Expand Down

0 comments on commit 0ab77c8

Please sign in to comment.