1
0
mirror of https://github.com/element-hq/element-web.git synced 2025-11-25 09:43:33 +03:00
Files
element-web/scripts/normalize-version.sh
2022-10-12 16:15:51 +01:00

11 lines
214 B
Bash
Executable File

#!/bin/bash
set -e
# If $1 looks like v1.2.3 or v1.2.3-foo, strip the leading v, then print it to stdout
if [[ $1 =~ ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+(-.+)?$ ]]; then
echo ${1:1}
else
echo $1
fi