OSX: 下载Flash Player的脚本
Posted afatgoat
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了OSX: 下载Flash Player的脚本相关的知识,希望对你有一定的参考价值。
#!/bin/bash
# Download
curVersion=`/usr/bin/curl -s http://www.adobe.com/software/flash/about/ | sed -n '/Safari/,/<\\/tr/s/[^>]*>\\([0-9].*\\)<.*/\\1/p'`
url=https://fpdownload.adobe.com/get/flashplayer/pdc/$curVersion/install_flash_player_osx.dmg
/usr/bin/curl -s -o /tmp/flash$curVersion.dmg https://fpdownload.adobe.com/get/flashplayer/pdc/24.0.0.194/install_flash_player_osx.dmg
# Install
/usr/bin/hdiutil attach /flash$curVersion.dmg -nobrowse -quiet
/usr/sbin/installer -pkg '/Volumes/Flash Player/Install Adobe Flash Player.app/Contents/Resources/Adobe Flash Player.pkg' -target /
# Check installed version
/usr/bin/defaults read '/Library/Internet Plug-Ins/Flash Player.plugin/Contents/version' CFBundleShortVersionString
开发者涨薪指南 48位大咖的思考法则、工作方式、逻辑体系
以上是关于OSX: 下载Flash Player的脚本的主要内容,如果未能解决你的问题,请参考以下文章
macOS: 卸载 Flash Player 迎接 2021