#!/bin/bash
#
sudo ls
cp -a /Volumes/Software/1.Mac/浏览器/GoogleChrome-120.0.6099.234.dmg ~/Desktop
cp -a /Volumes/Software/1.Mac/新Mac标准安装/Keka-1.1.30.dmg ~/Desktop
cp -a /Volumes/Software/1.Mac/新Mac标准安装/三件套/三件套12.2.1/Keynote\ 讲演.zip ~/Desktop
cp -a /Volumes/Software/1.Mac/新Mac标准安装/三件套/三件套12.2.1/Numbers\ 表格.zip ~/Desktop
cp -a /Volumes/Software/1.Mac/新Mac标准安装/三件套/三件套12.2.1/Pages\ 文稿.zip ~/Desktop
cp -a /Volumes/Software/1.Mac/新Mac标准安装/输入法/sogou_mac_57a.zip ~/Desktop
cp -a /Volumes/Software/1.Mac/新Mac标准安装/AppleConnectInstaller5-5.dmg ~/Desktop
cp -a /Volumes/Software/1.Mac/新Mac标准安装/radar/Radar\ 8.3.zip ~/Desktop
cp -a /Volumes/Software/1.Mac/新Mac标准安装/Jietu_2.2.2\(11054\).dmg ~/Desktop
cp -a /Volumes/Software/1.Mac/新Mac标准安装/新host/hosts ~/Desktop
cp -a /Volumes/Software/1.Mac/新Mac标准安装/Microsoft\ Remote\ Desktop\ Beta.zip ~/Desktop
cp -a /Volumes/Software/1.Mac/新Mac标准安装/管控类/JS-10.54.2.8\(mac\).run.dmg ~/Desktop
sysctl -n machdep.cpu.brand_string | grep -i Intel
if [ $? = 0 ];then
cp -a /Volumes/Software/1.Mac/新Mac标准安装/office/office2021\ for\ mac ~/Desktop #inter
else
cp -a /Volumes/Software/1.Mac/新Mac标准安装/office/office2021\ M1mac ~/Desktop #M1 or M2
fi
#!/bin/bash
#
sudo ls
cp -a /Volumes/Software/1.Mac/浏览器/GoogleChrome-120.0.6099.234.dmg ~/Desktop
cp -a /Volumes/Software/1.Mac/新Mac标准安装/Keka-1.1.30.dmg ~/Desktop
cp -a /Volumes/Software/1.Mac/新Mac标准安装/三件套/三件套12.2.1/Keynote\ 讲演.zip ~/Desktop
cp -a /Volumes/Software/1.Mac/新Mac标准安装/三件套/三件套12.2.1/Numbers\ 表格.zip ~/Desktop
cp -a /Volumes/Software/1.Mac/新Mac标准安装/三件套/三件套12.2.1/Pages\ 文稿.zip ~/Desktop
cp -a /Volumes/Software/1.Mac/新Mac标准安装/输入法/sogou_mac_57a.zip ~/Desktop
cp -a /Volumes/Software/1.Mac/新Mac标准安装/AppleConnectInstaller5-5.dmg ~/Desktop
cp -a /Volumes/Software/1.Mac/新Mac标准安装/radar/Radar\ 8.3.zip ~/Desktop
cp -a /Volumes/Software/1.Mac/新Mac标准安装/Jietu_2.2.2\(11054\).dmg ~/Desktop
cp -a /Volumes/Software/1.Mac/新Mac标准安装/新host/hosts ~/Desktop
cp -a /Volumes/Software/1.Mac/新Mac标准安装/Microsoft\ Remote\ Desktop\ Beta.zip ~/Desktop
cp -a /Volumes/Software/1.Mac/新Mac标准安装/管控类/JS-10.54.2.8\(mac\).run.dmg ~/Desktop
sysctl -n machdep.cpu.brand_string | grep -i Intel
if [ $? = 0 ];then
cp -a /Volumes/Software/1.Mac/新Mac标准安装/office/office2021\ for\ mac ~/Desktop #inter
else
cp -a /Volumes/Software/1.Mac/新Mac标准安装/office/office2021\ M1mac ~/Desktop #M1 or M2
fi
hdiutil attach ~/Desktop/GoogleChrome-120.0.6099.234.dmg
sudo /bin/cp -a "/Volumes/Google Chrome/Google Chrome.app" /Applications/
hdiutil detach "/Volumes/Google Chrome"
str1="1)成功安装chrome浏览器;"
hdiutil attach ~/Desktop/Keka-1.1.30.dmg
sudo /bin/cp -a "/Volumes/Keka/Keka.app" /Applications/
hdiutil detach "/Volumes/Keka"
str2="2)成功安装Keka;"
unzip -o "~/Desktop/Keynote 讲演.zip"
sudo /bin/cp -a "~/Desktop/Keynote.app" /Applications/
str3="3)成功安装Keynote;"
unzip -o "~/Desktop/Numbers 表格.zip"
sudo /bin/cp -a "~/Desktop/Numbers.app" /Applications/
str4="4)安装Numbers;"
unzip -o "~/Desktop/Pages 文稿.zip"
sudo /bin/cp -a "~/Desktop/Pages.app" /Applications/
str5="5)成功安装Pages;"
unzip -o "~/Desktop/sogou_mac_57a.zip"
sudo "~/Desktop/sogou_mac_57a.app/Contents/MacOS/SogouInstaller"
str6="6)成功安装搜狗拼音;"
hdiutil attach ~/Desktop/AppleConnectInstaller5-5.dmg
sudo installer -pkg "/Volumes/AppleConnect/AppleConnect.pkg" -target /
hdiutil detach "/Volumes/AppleConnect"
str7="7)成功安装AppleConnect;"
unzip -o "~/Desktop/Radar 8.3.zip"
sudo /bin/cp -a "~/Desktop/Radar 8.app" /Applications/
str8="8)成功安装Radar;"
hdiutil attach ~/Desktop/Jietu_2.2.2\(11054\).dmg
sudo /bin/cp -a "/Volumes/Jietu/Jietu.app" /Applications/
hdiutil detach "/Volumes/Jietu"
str9="9)成功安装截图;"
sudo /bin/cp -a "~/Desktop/hosts" /etc/
str10="10)成功安装hosts文件;"
unzip -o "~/Desktop/Microsoft Remote Desktop Beta.zip"
sudo /bin/cp -a "~/Desktop/Microsoft Remote Desktop Beta.app" /Applications/
str11="11)成功安装RDP;"
hdiutil attach ~/Desktop/JS-10.54.2.8\(mac\).run.dmg
sudo installer -pkg /Volumes/TECAGENT/TecAgent.pkg -target /
hdiutil detach "/Volumes/TECAGENT"
str12="12)成功安装ipguard;"
sysctl -n machdep.cpu.brand_string | grep -i Intel
if [ $? = 0 ];then
#inter
sudo installer -pkg "~/Desktop/office2021 for mac/Microsoft_Office_16.58.22021501_BusinessPro_Installer.pkg" -target /
hdiutil attach ~/Desktop/office2021\ for\ mac/SWDVD5_Office_Mac_Serializer_2021_MLF_X22-74226.ISO
sudo installer -pkg "/Volumes/Office 2021/Microsoft_Office_LTSC_2021_VL_Serializer.pkg " -target /
hdiutil detach "/Volumes/Office 2021"
str13="13)成功安装office;"
else
#M1 or M2
sudo installer -pkg "~/Desktop/office2021 M1mac/Microsoft_Office_16.58.22021501_BusinessPro_Installer.pkg" -target /
hdiutil attach ~/Desktop/office2021\ M1mac/SWDVD5_Office_Mac_Serializer_2021_MLF_X22-74226.ISO
sudo installer -pkg "/Volumes/Office 2021/Microsoft_Office_LTSC_2021_VL_Serializer.pkg" -target /
hdiutil detach "/Volumes/Office 2021"
str13="13)成功安装office;"
fi
sudo rm -Rf "~/Desktop/GoogleChrome-120.0.6099.234.dmg"
sudo rm -Rf "~/Desktop/Keka-1.1.30.dmg"
sudo rm -Rf "~/Desktop/Keynote 讲演.zip"
sudo rm -Rf "~/Desktop/Numbers 表格.zip"
sudo rm -Rf "~/Desktop/Pages 文稿.zip"
sudo rm -Rf "~/Desktop/sogou_mac_57a.zip"
sudo rm -Rf "~/Desktop/AppleConnectInstaller5-5.dmg"
sudo rm -Rf "~/Desktop/Radar 8.3.zip"
sudo rm -Rf "~/Desktop/Jietu_2.2.2(11054).dmg"
sudo rm -Rf "~/Desktop/hosts"
sudo rm -Rf "~/Desktop/Microsoft Remote Desktop Beta.zip"
sudo rm -Rf "~/Desktop/JS-10.54.2.8(mac).run.dmg"
sysctl -n machdep.cpu.brand_string | grep -i Intel
if [ $? = 0 ];then
sudo rm -Rf "~/Desktop/office2021 for mac" #inter
else
sudo rm -Rf "~/Desktop/office2021 M1mac" #M1 or M2
fi
#删除OneDrive.app
sudo rm -Rf "/Applications/OneDrive.app"
str = "${str1}\\n ${str2}\\n ${str3}\\n ${str4}\\n ${str5}\\n ${str6}\\n ${str7}\\n ${str8}\\n ${str9}\\n ${str10}\\n ${str11}\\n ${str12}\\n ${str13}";
(/usr/bin/osascript -e 'display dialog "${str}" buttons {"OK"} default button "OK" ')