diff options
author | Roman Perepelitsa <roman.perepelitsa@gmail.com> | 2020-11-26 10:53:49 +0300 |
---|---|---|
committer | Roman Perepelitsa <roman.perepelitsa@gmail.com> | 2020-11-26 10:53:49 +0300 |
commit | 9d6444a557017de8ed3fd4eba8ff92510fd7121a (patch) | |
tree | 58a6e381ddd37187acba3aa647710ffd2e391411 | |
parent | 381bd09e67328fbce598473c9f443ac9587a333d (diff) | |
parent | a7f417245dc21b666f5647c4a0d55a1f51fe6cac (diff) |
Merge commit 'a7f417245dc21b666f5647c4a0d55a1f51fe6cac'v1.14.2
-rwxr-xr-x | gitstatus/install | 43 |
1 files changed, 14 insertions, 29 deletions
diff --git a/gitstatus/install b/gitstatus/install index 3b92daef..23501b9c 100755 --- a/gitstatus/install +++ b/gitstatus/install @@ -7,38 +7,23 @@ _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 + *-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 - >&"$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() { |