« [Acrobat]trustedNewDoc 新規ブランク書類を作成する | トップページ | [Adobe]SAPCode »

[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

こんな感じかな

ダウンロード - arch.zip


|

« [Acrobat]trustedNewDoc 新規ブランク書類を作成する | トップページ | [Adobe]SAPCode »

AppleScriptBasics」カテゴリの記事