|
|
|
@ -7,30 +7,10 @@ _gitstatus_install_daemon_found() {
|
|
|
|
|
shift
|
|
|
|
|
|
|
|
|
|
case "$daemon" in
|
|
|
|
|
*-darwin-x86_64);;
|
|
|
|
|
*)
|
|
|
|
|
[ $# = 0 ] || "$@" "$daemon" "$version" "$installed"
|
|
|
|
|
return
|
|
|
|
|
;;
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
*-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'
|
|
|
|
@ -39,6 +19,11 @@ _gitstatus_install_daemon_found() {
|
|
|
|
|
>&"$e" printf '\n'
|
|
|
|
|
>&"$e" printf 'Once Rosetta is installed, restart your shell.\n'
|
|
|
|
|
return 1
|
|
|
|
|
fi
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
[ $# = 0 ] || "$@" "$daemon" "$version" "$installed"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_gitstatus_install_main() {
|
|
|
|
|