/ de-omarchy / bin / omarchy-version-branch
swadhinbiswas Fix installer: batch repo pkgs + stdin-safe AUR prompts, create /etc/environment.d, retarget all runtime fallbacks to /usr/share/de-omarchy · 8/22/2026
3eba9d4
19 lines · 490 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

# omarchy:summary=Print the active Omarchy dev-link git branch
# omarchy:hidden=true

omarchy_path=${OMARCHY_PATH:-/usr/share/de-omarchy}
omarchy_path=${omarchy_path%/}

[[ $omarchy_path != "/usr/share/de-omarchy" ]] || exit 1

branch=$(git -C "$omarchy_path" branch --show-current 2>/dev/null || true)
if [[ -z $branch ]]; then
  hash=$(git -C "$omarchy_path" rev-parse --short HEAD 2>/dev/null || true)
  [[ -n $hash ]] || exit 1
  branch="detached@$hash"
fi

echo "$branch"