|
|
@ -7,38 +7,23 @@ _gitstatus_install_daemon_found() {
|
|
|
|
shift
|
|
|
|
shift
|
|
|
|
|
|
|
|
|
|
|
|
case "$daemon" in
|
|
|
|
case "$daemon" in
|
|
|
|
*-darwin-x86_64);;
|
|
|
|
*-darwin-x86_64)
|
|
|
|
*)
|
|
|
|
if [ "$uname_m" = arm64 ] &&
|
|
|
|
[ $# = 0 ] || "$@" "$daemon" "$version" "$installed"
|
|
|
|
[ ! -e /Library/Apple/System/Library/LaunchDaemons/com.apple.oahd.plist ] &&
|
|
|
|
return
|
|
|
|
[ -x /usr/sbin/softwareupdate ]; then
|
|
|
|
;;
|
|
|
|
>&"$e" printf 'Please run the following command to install Rosetta:\n'
|
|
|
|
esac
|
|
|
|
>&"$e" printf '\n'
|
|
|
|
|
|
|
|
>&"$e" printf ' \033[32m/usr/sbin/softwareupdate\033[0m --install-rosetta\n'
|
|
|
|
local cpu
|
|
|
|
>&"$e" printf '\n'
|
|
|
|
if [ "$uname_s" != darwin ] || [ "$uname_m" != arm64 ] ||
|
|
|
|
>&"$e" printf 'See for details: \033[4mhttps://support.apple.com/en-us/HT211861\033[0m\n'
|
|
|
|
[ -e /Library/Apple/System/Library/LaunchDaemons/com.apple.oahd.plist ] ||
|
|
|
|
>&"$e" printf '\n'
|
|
|
|
[ ! -x /usr/sbin/softwareupdate ] ||
|
|
|
|
>&"$e" printf 'Once Rosetta is installed, restart your shell.\n'
|
|
|
|
! cpu="$(/usr/sbin/sysctl -n machdep.cpu.brand_string)"; then
|
|
|
|
return 1
|
|
|
|
[ $# = 0 ] || "$@" "$daemon" "$version" "$installed"
|
|
|
|
fi
|
|
|
|
return
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case "$cpu" in
|
|
|
|
|
|
|
|
*Intel*);;
|
|
|
|
|
|
|
|
*)
|
|
|
|
|
|
|
|
[ $# = 0 ] || "$@" "$daemon" "$version" "$installed"
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
|
|
>&"$e" printf 'Please run the following command to install Rosetta:\n'
|
|
|
|
[ $# = 0 ] || "$@" "$daemon" "$version" "$installed"
|
|
|
|
>&"$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
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
_gitstatus_install_main() {
|
|
|
|
_gitstatus_install_main() {
|
|
|
|