Something went wrong. Try again.
Mirroring: https://github.com/MunifTanjim/scripts.sh
Something went wrong. Try again.
scripts.sh setup-popcorntime
1.1 kB · 38 lines
at main
123456789101112131415161718192021222324252627282930313233343536373839#!/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.xzrm -rf PopcornTime && mkdir -p PopcornTimetar -Jxf popcorntime.tar.xz -C ./PopcornTimerm popcorntime.tar.xz
echo "Installation Directory: ${_popcorntime_dir}"if [[ -d "${_popcorntime_dir}" ]]; then sudo rm -rf ${_popcorntime_dir}fisudo 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 <<EOL[Desktop Entry]Version=1.0Type=ApplicationTerminal=falseName=PopCorn TimeExec=popcorntimeIcon=${_popcorntime_dir}/src/app/images/icon.pngCategories=Application;EOL
echo "Done!"