mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-29 03:49:28 +08:00
46c005a5d3
Some operating systems, such as NixOS, don't place binaries in /bin. The appropriate cross-platform method is to use /usr/bin/env.
11 lines
222 B
Bash
Executable File
11 lines
222 B
Bash
Executable File
#!/usr/bin/env 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
|