From c11a6ee5e9ca8d488ae4f6768d3b0a820e75e386 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Sat, 7 May 2022 15:18:15 -0600 Subject: [PATCH] Add revision number --- build.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/build.sh b/build.sh index 16dbc02..3d7d04a 100755 --- a/build.sh +++ b/build.sh @@ -2,10 +2,10 @@ # This script is licensed under your favorite open source license. # I really don't care what you do with it. -if [ $# -ne 4 ]; then - echo "Usage: build.sh [architecture] [package version] [normal|sdk] [binary tar.gz url]" +if [ $# -ne 5 ]; then + echo "Usage: build.sh [architecture] [package version] [normal|sdk] [binary tar.gz url] [same-version revision number]" echo "Note: It is recommended to use \`fakeroot build.sh ...\` to ensure correct file permissions" - echo -e "Example usage:\n\tfakeroot ./build.sh amd64 0.38.4 normal https://dl.nwjs.io/v0.38.4/nwjs-v0.38.4-linux-x64.tar.gz" + echo -e "Example usage:\n\tfakeroot ./build.sh amd64 0.38.4 normal https://dl.nwjs.io/v0.38.4/nwjs-v0.38.4-linux-x64.tar.gz 1" exit 1 fi @@ -13,14 +13,15 @@ ARCH=$1 VERSION=$2 TYPE=$3 URL=$4 +REVISION=$5 -FILENAME="nwjs-${TYPE}_$VERSION-1_$ARCH.deb" +FILENAME="nwjs-${TYPE}_$VERSION-$REVISION_$ARCH.deb" mkdir -p out # Fill in real architecture and version info # Need to escape periods in the version string first -ESCAPEDVERSION=$(echo "$VERSION" | sed 's/\./\\\./g') +ESCAPEDVERSION=$(echo "$VERSION-$REVISION" | sed 's/\./\\\./g') echo "Setting package version, architecture, and type in control file" sed -i "s/ARCH/$ARCH/" debian/DEBIAN/control sed -i "s/VERSION/$ESCAPEDVERSION/" debian/DEBIAN/control