Compare commits
3 Commits
main
...
yage/dev/v
Author | SHA1 | Date | |
---|---|---|---|
6abb0fc7b8 | |||
695a01fb3d | |||
d1a17e4285 |
2
scwrypts
2
scwrypts
@ -84,7 +84,7 @@ source "$(dirname $(readlink -f "$0"))/zsh/lib/import.driver.zsh" || exit 42
|
||||
--version )
|
||||
case $SCWRYPTS_INSTALLATION_TYPE in
|
||||
manual ) echo "scwrypts $(GIT_SCWRYPTS describe --tags) (via GIT)" ;;
|
||||
* ) echo "scwrypts $(cat "$SCWRYPTS_ROOT__scwrypts/VERSION")" ;;
|
||||
* ) echo scwrypts $(cat "$SCWRYPTS_ROOT__scwrypts/VERSION") ;;
|
||||
esac
|
||||
return 0
|
||||
;;
|
||||
|
@ -1,11 +1,7 @@
|
||||
[[ $__SCWRYPT -eq 1 ]] && return 0
|
||||
#####################################################################
|
||||
|
||||
# Apparently MacOS puts ALL of the homebrew stuff inside of a top level git repository
|
||||
# with bizarre git ignores; so:
|
||||
# - USE the git root if it's a manual install...
|
||||
# - UNLESS that git root is just the $(brew --prefix)
|
||||
SCWRYPTS_ROOT="$(cd -- ${0:a:h}; git rev-parse --show-toplevel 2>/dev/null | grep -v "^$(brew --prefix 2>/dev/null)$")"
|
||||
SCWRYPTS_ROOT="$(cd -- ${0:a:h}; git rev-parse --show-toplevel 2>/dev/null)"
|
||||
|
||||
[ $SCWRYPTS_ROOT ] && [ -d "$SCWRYPTS_ROOT" ] \
|
||||
|| SCWRYPTS_ROOT="$(echo "${0:a:h}" | sed -n 's|\(share/scwrypts\).*$|\1|p')"
|
||||
@ -15,13 +11,12 @@ SCWRYPTS_ROOT="$(cd -- ${0:a:h}; git rev-parse --show-toplevel 2>/dev/null | gre
|
||||
exit 1
|
||||
}
|
||||
|
||||
export SCWRYPTS_ROOT__scwrypts="$SCWRYPTS_ROOT"
|
||||
|
||||
[ -f "$SCWRYPTS_ROOT__scwrypts/MANAGED_BY" ] \
|
||||
&& export SCWRYPTS_INSTALLATION_TYPE=$(cat "$SCWRYPTS_ROOT__scwrypts/MANAGED_BY") \
|
||||
|| export SCWRYPTS_INSTALLATION_TYPE=manual \
|
||||
;
|
||||
|
||||
export SCWRYPTS_ROOT__scwrypts="$SCWRYPTS_ROOT"
|
||||
|
||||
#####################################################################
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user