mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
24 lines
476 B
Bash
Executable File
24 lines
476 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# omarchy:summary=Print the installed Omarchy version
|
|
|
|
omarchy_path=${OMARCHY_PATH:-/usr/share/omarchy}
|
|
omarchy_path=${omarchy_path%/}
|
|
|
|
if [[ $omarchy_path != "/usr/share/omarchy" ]]; then
|
|
hash=$(git -C "$omarchy_path" rev-parse --short HEAD 2>/dev/null || true)
|
|
|
|
if [[ -n $hash ]]; then
|
|
echo "dev ($hash)"
|
|
else
|
|
echo "dev"
|
|
fi
|
|
|
|
exit 0
|
|
fi
|
|
|
|
version=$(pacman -Q omarchy 2>/dev/null | awk '{ print $2 }')
|
|
[[ -n $version ]] || exit 1
|
|
|
|
echo "$version"
|