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
|
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) ;
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user