Mac终端安装DMG

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sinat_25544827/article/details/53765446
  1. 切换到下载内容存放目录
  2. 下载DMG文件
  3. 安装DMG,默认在/Volumes/
  4. 复制.app/Applications/
  5. 推出安装卷轴
# 1. 
cd ~/Downloads

#2. 下载
curl -O resourceUrl

# 3. 安装DMG,会安装到/Volumes下
hdiutil attach xxx.dmg

# 4.1 复制.app文件夹到Application下
cp -rf ./xxx.app /Applications

# 4.2如果是pkg
sudo installer -pkg xxx.pkg -target /Application
# 4.3 如果是.config、.sh文件则运行对应文件

# 5. 推出
hdiutil detach /Volumes/DarwinPorts-1.2/

猜你喜欢

转载自blog.csdn.net/sinat_25544827/article/details/53765446
DMG