Last active
June 1, 2018 23:36
-
-
Save benhoIIand/540d6fc136a3ce19870a85ea4415a17d to your computer and use it in GitHub Desktop.
filebot.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# TODO: release new version of FileBot for Linux | |
FILEBOT_PACKAGE_VERSION=4.7.21 | |
FILEBOT_PACKAGE_SHA256=e7c99f5a0b55bf52d78f94fec3344f1951c70e0ad33aa2bc51596863fff90fc8 | |
FILEBOT_PACKAGE=FileBot.tar.xz.gpg | |
FILEBOT_PACKAGE_URL=http://get.filebot.net/filebot/latest/$FILEBOT_PACKAGE | |
FILEBOT_PACKAGE_KEY=4E402EBF7C3C6A71 | |
FILEBOT_PACKAGE_KEY_URL=https://raw.githubusercontent.com/filebot/plugins/master/gpg/maintainer.pub | |
# Download latest portable package | |
curl -o "$FILEBOT_PACKAGE" -z "$FILEBOT_PACKAGE" --retry 5 --location "$FILEBOT_PACKAGE_URL" | |
# Check SHA-256 checksum | |
echo "$FILEBOT_PACKAGE_SHA256 *$FILEBOT_PACKAGE" | sha256sum --check || exit 1 | |
# initialize GnuPG | |
curl -fsSL "$FILEBOT_PACKAGE_KEY_URL" | gpg --import | |
# verify GnuPG signature | |
gpg --batch --yes --trusted-key "$FILEBOT_PACKAGE_KEY" --output "FileBot.tar.xz" --decrypt "$FILEBOT_PACKAGE" || exit 1 | |
# Extract *.tar.xz archive | |
tar xvf "FileBot.tar.xz" && rm "FileBot.tar.xz" | |
# Check if filebot.sh works | |
"$PWD/filebot.sh" -script fn:sysinfo | |
# Link into default $PATH | |
ln -sf "$PWD/filebot.sh" /usr/local/bin/filebot | |
# Check if the filebot command works | |
filebot -version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment