build-package.sh: improve version string editing for pacman format (#8384)
This commit is contained in:
parent
3f3b0a0272
commit
b2fbd905e2
@ -68,9 +68,12 @@ termux_create_pacman_subpackages() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Version view revisions.
|
# Version view revisions.
|
||||||
local TERMUX_PKG_VERSION=$(echo $TERMUX_PKG_VERSION | sed "s|-|.|g")
|
local TERMUX_PKG_VERSION_EDITED=${TERMUX_PKG_VERSION//-/.}
|
||||||
local TERMUX_PKG_VERSION=${TERMUX_PKG_VERSION/[a-z]/.${TERMUX_PKG_VERSION//[0-9.]/}}
|
local INCORRECT_SYMBOLS=$(echo $TERMUX_PKG_VERSION_EDITED | grep -o '[0-9][a-z]')
|
||||||
local TERMUX_PKG_FULLVERSION="${TERMUX_PKG_VERSION}"
|
if [ -n "$INCORRECT_SYMBOLS" ]; then
|
||||||
|
local TERMUX_PKG_VERSION_EDITED=${TERMUX_PKG_VERSION_EDITED//${INCORRECT_SYMBOLS:0:1}${INCORRECT_SYMBOLS:1:1}/${INCORRECT_SYMBOLS:0:1}.${INCORRECT_SYMBOLS:1:1}}
|
||||||
|
fi
|
||||||
|
local TERMUX_PKG_FULLVERSION="${TERMUX_PKG_VERSION_EDITED}"
|
||||||
if [ -n "$TERMUX_PKG_REVISION" ]; then
|
if [ -n "$TERMUX_PKG_REVISION" ]; then
|
||||||
TERMUX_PKG_FULLVERSION+="-${TERMUX_PKG_REVISION}"
|
TERMUX_PKG_FULLVERSION+="-${TERMUX_PKG_REVISION}"
|
||||||
else
|
else
|
||||||
|
@ -36,9 +36,12 @@ termux_step_create_pacman_package() {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# Version view revisions.
|
# Version view revisions.
|
||||||
local TERMUX_PKG_VERSION=$(echo $TERMUX_PKG_VERSION | sed "s|-|.|g")
|
local TERMUX_PKG_VERSION_EDITED=${TERMUX_PKG_VERSION//-/.}
|
||||||
local TERMUX_PKG_VERSION=${TERMUX_PKG_VERSION/[a-z]/.${TERMUX_PKG_VERSION//[0-9.]/}}
|
local INCORRECT_SYMBOLS=$(echo $TERMUX_PKG_VERSION_EDITED | grep -o '[0-9][a-z]')
|
||||||
local TERMUX_PKG_FULLVERSION="${TERMUX_PKG_VERSION}"
|
if [ -n "$INCORRECT_SYMBOLS" ]; then
|
||||||
|
local TERMUX_PKG_VERSION_EDITED=${TERMUX_PKG_VERSION_EDITED//${INCORRECT_SYMBOLS:0:1}${INCORRECT_SYMBOLS:1:1}/${INCORRECT_SYMBOLS:0:1}.${INCORRECT_SYMBOLS:1:1}}
|
||||||
|
fi
|
||||||
|
local TERMUX_PKG_FULLVERSION="${TERMUX_PKG_VERSION_EDITED}"
|
||||||
if [ -n "$TERMUX_PKG_REVISION" ]; then
|
if [ -n "$TERMUX_PKG_REVISION" ]; then
|
||||||
TERMUX_PKG_FULLVERSION+="-${TERMUX_PKG_REVISION}"
|
TERMUX_PKG_FULLVERSION+="-${TERMUX_PKG_REVISION}"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user