FileRules: Make DownloadLocatedFile1 less cryptic.
As Jam prints the entire erring command on failure, including this if-test in the command itself makes the output somewhat difficult to decipher. So instead we use two separate rules based on whether or not NO_DOWNLOADS is set or not.
This commit is contained in:
parent
4293d6b7da
commit
134e58ec8d
@ -442,15 +442,20 @@ rule DownloadLocatedFile target : url : source
|
|||||||
DownloadLocatedFile1 $(target) : $(source) ;
|
DownloadLocatedFile1 $(target) : $(source) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
actions DownloadLocatedFile1
|
if $(HAIKU_NO_DOWNLOADS) = 1 {
|
||||||
{
|
actions DownloadLocatedFile1
|
||||||
source="$(2)"
|
{
|
||||||
if [ "$(HAIKU_NO_DOWNLOADS)" = 1 ]; then
|
source="$(2)"
|
||||||
echo "ERROR: Would need to download $(URL), but HAIKU_NO_DOWNLOADS is set!"
|
echo "ERROR: Would need to download $(UR2L), but HAIKU_NO_DOWNLOADS is set!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
}
|
||||||
wget --retry-connrefused --timeout 30 -O "$(1)" $(URL) || exit 1
|
} else {
|
||||||
touch "$(1)"
|
actions DownloadLocatedFile1
|
||||||
|
{
|
||||||
|
source="$(2)"
|
||||||
|
wget --retry-connrefused --timeout 30 -O "$(1)" $(URL) || exit 1
|
||||||
|
touch "$(1)"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rule DownloadFile file : url : source
|
rule DownloadFile file : url : source
|
||||||
|
Loading…
Reference in New Issue
Block a user