Add variable noDownloads to build_haiku_image.
* If noDownloads is set, show an error when a download is requested.
This commit is contained in:
@@ -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) ;
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user