We now have a global $OMARCHY_PATH
This commit is contained in:
parent
add56181d7
commit
4e136ded68
@ -1,15 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
omarchy_path="$HOME/.local/share/omarchy"
|
|
||||||
|
|
||||||
# Ensure remote is reachable
|
# Ensure remote is reachable
|
||||||
if ! git -C "$omarchy_path" ls-remote &>/dev/null; then
|
if ! git -C "$OMARCHY_PATH" ls-remote &>/dev/null; then
|
||||||
echo "Error: Unable to reach remote repository."
|
echo "Error: Unable to reach remote repository."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
latest_tag=$(git -C "$omarchy_path" ls-remote --tags origin | grep -v "{}" | awk '{print $2}' | sed 's#refs/tags/##' | sort -V | tail -n 1)
|
latest_tag=$(git -C "$OMARCHY_PATH" ls-remote --tags origin | grep -v "{}" | awk '{print $2}' | sed 's#refs/tags/##' | sort -V | tail -n 1)
|
||||||
current_tag=$(git -C "$omarchy_path" describe --tags $(git -C "$omarchy_path" rev-list --tags --max-count=1))
|
current_tag=$(git -C "$OMARCHY_PATH" describe --tags $(git -C "$OMARCHY_PATH" rev-list --tags --max-count=1))
|
||||||
|
|
||||||
if [[ "$current_tag" != "$latest_tag" ]]; then
|
if [[ "$current_tag" != "$latest_tag" ]]; then
|
||||||
echo "Omarchy update available ($latest_tag)"
|
echo "Omarchy update available ($latest_tag)"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user