#!/usr/bin/env bash cd /tmp || exit echo "Installing PopcornTime..." _popcorntime_version=${1:-"0.3.10"} _popcorntime_platform=${2:-"Linux-64"} _popcorntime_url="https://get.popcorntime.sh/build/Popcorn-Time-${_popcorntime_version}-${_popcorntime_platform}.tar.xz" _popcorntime_dir="/opt/PopcornTime" echo "Downloading Source Archive..." wget -q --show-progress ${_popcorntime_url} -O popcorntime.tar.xz rm -rf PopcornTime && mkdir -p PopcornTime tar -Jxf popcorntime.tar.xz -C ./PopcornTime rm popcorntime.tar.xz echo "Installation Directory: ${_popcorntime_dir}" if [[ -d "${_popcorntime_dir}" ]]; then sudo rm -rf ${_popcorntime_dir} fi sudo mv PopcornTime ${_popcorntime_dir} echo "Setting up PopcornTime binary: popcorntime" sudo ln -nsf ${_popcorntime_dir}/Popcorn-Time /usr/bin/popcorntime echo "Adding Application Shortcut..." cat > ${HOME}/.local/share/applications/popcorntime.desktop <