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 AddVariableToScript $(script) : resolvePackageDependencies
: $(resolvePackageDependencies) ; : $(resolvePackageDependencies) ;
AddVariableToScript $(script) : noDownloads : $(HAIKU_NO_DOWNLOADS) ;
AddVariableToScript $(script) : updateAllPackages AddVariableToScript $(script) : updateAllPackages
: $(HAIKU_UPDATE_ALL_PACKAGES) ; : $(HAIKU_UPDATE_ALL_PACKAGES) ;
+6
View File
@@ -16,6 +16,7 @@ set -o errexit
# imageSize # imageSize
# imageLabel # imageLabel
# resolvePackageDependencies # resolvePackageDependencies
# noDownloads
# updateAllPackages # updateAllPackages
# updateOnly # updateOnly
# dontClearImage # dontClearImage
@@ -214,6 +215,11 @@ downloadFile()
path=$2 path=$2
if [ ! -f "$path" ]; then 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" wget -O "$path" "$url"
fi fi
} }