Add variable noDownloads to build_haiku_image.

* If noDownloads is set, show an error when a download is requested.
This commit is contained in:
Oliver Tappe
2014-05-01 19:45:19 +02:00
parent d1b21b4ad3
commit 590b95e96e
2 changed files with 8 additions and 0 deletions
+2
View File
@@ -880,6 +880,8 @@ rule AddPackagesAndRepositoryVariablesToContainerScript script : container
AddVariableToScript $(script) : resolvePackageDependencies
: $(resolvePackageDependencies) ;
AddVariableToScript $(script) : noDownloads : $(HAIKU_NO_DOWNLOADS) ;
AddVariableToScript $(script) : updateAllPackages
: $(HAIKU_UPDATE_ALL_PACKAGES) ;
+6
View File
@@ -16,6 +16,7 @@ set -o errexit
# imageSize
# imageLabel
# resolvePackageDependencies
# noDownloads
# updateAllPackages
# updateOnly
# dontClearImage
@@ -214,6 +215,11 @@ downloadFile()
path=$2
if [ ! -f "$path" ]; then
if [ "$noDownloads" == "1" ]; then
echo "ERROR: Would need to download $url, but HAIKU_NO_DOWNLOADS "
"is set!"
exit 1
fi
wget -O "$path" "$url"
fi
}