Add revision number

master
Skylar Ittner 2 years ago
parent 3b914e4711
commit c11a6ee5e9

@ -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

Loading…
Cancel
Save