mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2024-06-03 06:22:14 +02:00
29526586ef
Change script header using env instead of direct Bash shell call (full path of 'env' is '/usr/bin/env')
22 lines
483 B
Bash
Executable file
22 lines
483 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -e
|
|
ROOT="$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
|
|
|
|
VERSION=
|
|
if [ -s "$ROOT/../version.txt" ]; then
|
|
VERSION=$(cat "$ROOT/../version.txt" | tr -d '[:space:]')
|
|
fi
|
|
if [ -z $VERSION ] && [ -d "$ROOT/../.git" ]; then
|
|
if [ "$1" == "--tar" ]; then
|
|
VERSION=$(git describe --dirty --tags --always | sed 's/debian\///g')
|
|
else
|
|
VERSION=$(git log -1 --pretty=%H)
|
|
fi
|
|
fi
|
|
|
|
if [ -z $VERSION ]; then
|
|
VERSION=unknown
|
|
fi
|
|
|
|
echo $VERSION
|