Skip to content

Commit

Permalink
change Rosetta detection statement
Browse files Browse the repository at this point in the history
  • Loading branch information
Graham R Pugh committed Jun 8, 2021
1 parent 97aa3b0 commit db1cbf1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Rosetta-2-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
Determine whether Rosetta is installed - install if not.
DOC

# is this an ARM Mac?
# is this an ARM Mac?
arch=$(/usr/bin/arch)
if [ "$arch" == "arm64" ]; then
echo "This is an arm64 Mac."
# is rosetta 2 installed?
if [[ -f "/Library/Apple/System/Library/LaunchDaemons/com.apple.oahd.plist" ]]; then
# is Rosetta 2 installed?
if arch -x86_64 /usr/bin/true 2>/dev/null ; then
echo "Rosetta 2 is already installed"
else
echo "Rosetta 2 is missing - installing"
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
if [[ -f "/Library/Apple/System/Library/LaunchDaemons/com.apple.oahd.plist" ]]; then
if arch -x86_64 /usr/bin/true 2>/dev/null; then
echo "Rosetta 2 is now installed"
else
echo "Rosetta 2 installation failed"
Expand Down
2 changes: 1 addition & 1 deletion pkg/Rosetta-2-install/build-info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
<key>suppress_bundle_relocation</key>
<true/>
<key>version</key>
<string>1.0</string>
<string>1.1</string>
</dict>
</plist>

0 comments on commit db1cbf1

Please sign in to comment.