We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a5e15eb commit 3c5c9a3Copy full SHA for 3c5c9a3
salt/freifunk/base/ddmesh/usr/local/bin/freifunk-version
@@ -1,8 +1,9 @@
1
#!/usr/bin/env bash
2
3
-version="$(head -n3 /srv/ffdd-server/init_server.sh | grep -oP '(?<=^#version=).+' | tr -d '"')"
4
-rev="$(cd /srv/ffdd-server && git describe --all --abbrev=0 | cut -f2 -d"/")"
5
-commit="$(cd /srv/ffdd-server && git show --oneline -s | awk '{print $1}')"
+install_dir="$(uci -qX get ffdd.sys.install_dir)"
+version="$(head -n3 "$install_dir"/init_server.sh | grep -oP '(?<=^#version=).+' | tr -d '"')"
+rev="$(cd "$install_dir" && git describe --all --abbrev=0 | cut -f2 -d"/")"
6
+commit="$(cd "$install_dir" && git show --oneline -s | awk '{print $1}')"
7
8
printf '%s - %s (%s)\n' "$version" "$rev" "$commit"
9
0 commit comments