Update subtitles.sh

This commit is contained in:
Reinhard Pointner 2017-06-03 18:56:09 +08:00
parent b0f6c3bbab
commit d5f52c7541
3 changed files with 1 additions and 37 deletions

View File

@ -1,16 +0,0 @@
#!/bin/sh -xu
# brew requires Command Line Tools for Xcode
xcode-select --print-path || sudo xcode-select --install
# install brew if necessary
brew info || ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# update brew package index and update all packages
brew update && brew upgrade
# install latest JDK
brew cask install java --force
# install FileBot bundle to ~/Applications
brew cask install filebot --force --appdir=~/Applications

View File

@ -1,20 +0,0 @@
#!/bin/sh -x
PKG_NAME="FileBot_Subtitles_Installer.pkg"
PKG_URL="https://app.filebot.net/files/$PKG_NAME"
PKG="/tmp/$PKG_NAME"
APP="/Applications/FileBot Subtitles.app"
function fetch {
curl --location --output "$1" --time-cond "$1" --retry 5 "$2"
}
function verify {
pkgutil --check-signature "$1" && spctl --assess --verbose --ignore-cache --no-cache --type install "$1"
}
function install {
sudo installer -verbose -package "$1" -target LocalSystem
}
fetch "$PKG" "$PKG_URL" && verify "$PKG" && install "$PKG" && open --reveal "$APP"

View File

@ -1,5 +1,5 @@
# redirect to download links
redirect 302 /files/FileBot_Subtitles_Installer.pkg https://downloads.sourceforge.net/project/filebot/filebot/LATEST/FileBot_Subtitles_Installer.pkg
redirect 302 /files/FileBot_Subtitles.pkg https://downloads.sourceforge.net/project/filebot/filebot/LATEST/FileBot_Subtitles.pkg
redirect 302 /files/ https://downloads.sourceforge.net/filebot/
# redirect to store