Squashed 'gitstatus/' changes from 4211e33b..e2276e72
e2276e72 install: fix the check for rosetta on darwin-arm64 git-subtree-dir: gitstatus git-subtree-split: e2276e729e0155391126ee4aa090aa38b345b9fd
This commit is contained in:
parent
622069e60f
commit
a7f417245d
43
install
43
install
|
@ -7,38 +7,23 @@ _gitstatus_install_daemon_found() {
|
|||
shift
|
||||
|
||||
case "$daemon" in
|
||||
*-darwin-x86_64);;
|
||||
*)
|
||||
[ $# = 0 ] || "$@" "$daemon" "$version" "$installed"
|
||||
return
|
||||
*-darwin-x86_64)
|
||||
if [ "$uname_m" = arm64 ] &&
|
||||
[ ! -e /Library/Apple/System/Library/LaunchDaemons/com.apple.oahd.plist ] &&
|
||||
[ -x /usr/sbin/softwareupdate ]; then
|
||||
>&"$e" printf 'Please run the following command to install Rosetta:\n'
|
||||
>&"$e" printf '\n'
|
||||
>&"$e" printf ' \033[32m/usr/sbin/softwareupdate\033[0m --install-rosetta\n'
|
||||
>&"$e" printf '\n'
|
||||
>&"$e" printf 'See for details: \033[4mhttps://support.apple.com/en-us/HT211861\033[0m\n'
|
||||
>&"$e" printf '\n'
|
||||
>&"$e" printf 'Once Rosetta is installed, restart your shell.\n'
|
||||
return 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
local cpu
|
||||
if [ "$uname_s" != darwin ] || [ "$uname_m" != arm64 ] ||
|
||||
[ -e /Library/Apple/System/Library/LaunchDaemons/com.apple.oahd.plist ] ||
|
||||
[ ! -x /usr/sbin/softwareupdate ] ||
|
||||
! cpu="$(/usr/sbin/sysctl -n machdep.cpu.brand_string)"; then
|
||||
[ $# = 0 ] || "$@" "$daemon" "$version" "$installed"
|
||||
return
|
||||
fi
|
||||
|
||||
case "$cpu" in
|
||||
*Intel*);;
|
||||
*)
|
||||
[ $# = 0 ] || "$@" "$daemon" "$version" "$installed"
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
>&"$e" printf 'Please run the following command to install Rosetta:\n'
|
||||
>&"$e" printf '\n'
|
||||
>&"$e" printf ' \033[32m/usr/sbin/softwareupdate\033[0m --install-rosetta\n'
|
||||
>&"$e" printf '\n'
|
||||
>&"$e" printf 'See for details: \033[4mhttps://support.apple.com/en-us/HT211861\033[0m\n'
|
||||
>&"$e" printf '\n'
|
||||
>&"$e" printf 'Once Rosetta is installed, restart your shell.\n'
|
||||
return 1
|
||||
[ $# = 0 ] || "$@" "$daemon" "$version" "$installed"
|
||||
}
|
||||
|
||||
_gitstatus_install_main() {
|
||||
|
|
Loading…
Reference in New Issue