mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-10 09:32:29 +01:00
sha256 versioning of library zip
This commit is contained in:
6
build.sh
6
build.sh
@@ -13,7 +13,7 @@ if [[ ! -d build ]]; then
|
||||
fi
|
||||
|
||||
# keep in sync with version in install.sh
|
||||
libversion=3
|
||||
sha256sum=0a7b5ea46e9cb4b19000b69690eae0b75929752f7db192c78bd7ffb61d696835
|
||||
libVFile="./libversion"
|
||||
libdir="./lib"
|
||||
currentversion=0
|
||||
@@ -26,7 +26,7 @@ if [ -f $libVFile ]; then
|
||||
done < $libVFile
|
||||
fi
|
||||
|
||||
if [ $currentversion -ge $libversion ]; then
|
||||
if [ "z$currentversion" == "z$sha256sum" ]; then
|
||||
needsdownload="false"
|
||||
fi
|
||||
|
||||
@@ -35,6 +35,7 @@ if [ ! -d $libdir ]; then
|
||||
fi
|
||||
|
||||
if [[ "$needsdownload" = "true" ]]; then
|
||||
echo "Found library had sha256sum $currentversion, expected $sha256sum"
|
||||
echo "New libraries need to be downloaded. Clearing cache and calling ./install.sh"
|
||||
rm -rf ./lib
|
||||
if [[ -f $cachedir/orctlibs.zip ]]; then
|
||||
@@ -47,7 +48,6 @@ if [[ "$needsdownload" = "true" ]]; then
|
||||
rm -rf $cachedir/orctlibs
|
||||
fi
|
||||
./install.sh
|
||||
echo $libversion > $libVFile
|
||||
fi
|
||||
|
||||
pushd build
|
||||
|
||||
@@ -166,7 +166,6 @@ elif [[ `uname` == "Linux" ]]; then
|
||||
fi
|
||||
else
|
||||
# prevent build.sh from re-doing all the steps again
|
||||
echo $libversion > $libVFile
|
||||
case "$TARGET" in
|
||||
"linux")
|
||||
sudo dpkg --add-architecture i386
|
||||
@@ -195,6 +194,9 @@ elif [[ `uname` == "Linux" ]]; then
|
||||
fi
|
||||
|
||||
download_libs
|
||||
# mind the gap (trailing space)
|
||||
sha256sum $cachedir/orctlibs.zip | cut -f1 -d\ > $libVFile
|
||||
echo "Downloaded library with sha256sum: $(cat $libVFile)"
|
||||
# Local libs are required for all targets
|
||||
install_local_libs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user