[Script]ARMアップルシリコンとINTELの分岐
set objSysInfo to system info
set theCpuType to (CPU type of objSysInfo) as text
if theCpuType contains "Intel" then
(*ここにインテル処理*)
else
(*ここにM1処理*)
end if
シェル の場合は
#!/bin/sh
theARC=`/usr/bin/arch`
theINTEL="i386"
if [ $theARC = $theINTEL ]; then
echo "#####Running on INTEL"
else
echo "#####Running on ARM"
fi
と
こんな感じかな
| 固定リンク
「AppleScriptBasics」カテゴリの記事
- [AppleScript]Dict Arrayの入れ子(ネスト)(2021.10.10)
- [Script]ARMアップルシリコンとINTELの分岐(2021.05.23)
- Function Key Codes(2020.09.06)
- Read My Scripts.app (Mountain Lion は AppleScript のルールをどう変更したか)(2012.08.12)
- [system info]ipアドレスを取得する。(2010.11.30)