Add check-version.sh script
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
URL="ftp://ftp.gnu.org/gnu/mtools/"
|
||||||
|
|
||||||
|
# Get version number from FTP server
|
||||||
|
VERSION=$(curl -s --list-only "$URL" | grep -E '^mtools-[0-9]{1,}\.[0-9]{1,}(\.[0-9]{1,})?.tar.gz$' | cut -d '-' -f2 | sort -V | tail -n1)
|
||||||
|
|
||||||
|
# Remove '.tar.gz' suffix from VERSION variable
|
||||||
|
VERSION=${VERSION//.tar.gz/}
|
||||||
|
|
||||||
|
echo "$VERSION"
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
|
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
|
||||||
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
|
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
|
||||||
|
|
||||||
DOWNLOAD="http://ftp.gnu.org/gnu/mtools/mtools-${BPM_PKG_VERSION}.tar.gz"
|
DOWNLOAD="https://ftpmirror.gnu.org/gnu/mtools/mtools-${BPM_PKG_VERSION}.tar.gz"
|
||||||
FILENAME="${DOWNLOAD##*/}"
|
FILENAME="${DOWNLOAD##*/}"
|
||||||
|
|
||||||
# The prepare function is executed in the root of the temp directory
|
# The prepare function is executed in the root of the temp directory
|
||||||
|
|||||||
Reference in New Issue
Block a user