Add revision number
This commit is contained in:
parent
3b914e4711
commit
c11a6ee5e9
11
build.sh
11
build.sh
@ -2,10 +2,10 @@
|
|||||||
# This script is licensed under your favorite open source license.
|
# This script is licensed under your favorite open source license.
|
||||||
# I really don't care what you do with it.
|
# I really don't care what you do with it.
|
||||||
|
|
||||||
if [ $# -ne 4 ]; then
|
if [ $# -ne 5 ]; then
|
||||||
echo "Usage: build.sh [architecture] [package version] [normal|sdk] [binary tar.gz url]"
|
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 "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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -13,14 +13,15 @@ ARCH=$1
|
|||||||
VERSION=$2
|
VERSION=$2
|
||||||
TYPE=$3
|
TYPE=$3
|
||||||
URL=$4
|
URL=$4
|
||||||
|
REVISION=$5
|
||||||
|
|
||||||
FILENAME="nwjs-${TYPE}_$VERSION-1_$ARCH.deb"
|
FILENAME="nwjs-${TYPE}_$VERSION-$REVISION_$ARCH.deb"
|
||||||
|
|
||||||
mkdir -p out
|
mkdir -p out
|
||||||
|
|
||||||
# Fill in real architecture and version info
|
# Fill in real architecture and version info
|
||||||
# Need to escape periods in the version string first
|
# 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"
|
echo "Setting package version, architecture, and type in control file"
|
||||||
sed -i "s/ARCH/$ARCH/" debian/DEBIAN/control
|
sed -i "s/ARCH/$ARCH/" debian/DEBIAN/control
|
||||||
sed -i "s/VERSION/$ESCAPEDVERSION/" debian/DEBIAN/control
|
sed -i "s/VERSION/$ESCAPEDVERSION/" debian/DEBIAN/control
|
||||||
|
Loading…
x
Reference in New Issue
Block a user