22 lines
910 B
Bash
22 lines
910 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
cd -- "$( dirname -- "${BASH_SOURCE[0]}" )"
|
||
|
|
||
|
wget -N "https://storage.googleapis.com/vectric_public/VCarveProTrialEdition_Setup.exe" --directory-prefix tools/
|
||
|
|
||
|
version=$(7z e -so tools/VCarveProTrialEdition_Setup.exe ProductInfo.ini | awk -F= '$1=="product_version" { print $2 }')
|
||
|
major_version=$(awk -F. -v RS='\r\n' '{print $1"."$2}' <<< $version)
|
||
|
minor_version=$(awk -F. -v RS='\r\n' '{print $3"."$4}' <<< $version)
|
||
|
checksum=$(sha256sum tools/VCarveProTrialEdition_Setup.exe | awk '{print $1}')
|
||
|
|
||
|
if [ "$major_version" != "11.0" ]
|
||
|
then
|
||
|
echo "Major version update! This probably won't really work well."
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
echo "Current version for ${PWD##*/}: major=$major_version, minor=$minor_version, checksum=$checksum"
|
||
|
|
||
|
sed -i "s|<version>[^<]*</version>|<version>$minor_version</version>|" vcarve-pro-trial-11.0.nuspec
|
||
|
sed -i "/Checksum64/s|=.*|= '$checksum'|" tools/chocolateyInstall.ps1
|