From 3d162cf0af6ec30f3ec07c45ceb2960678cd058a Mon Sep 17 00:00:00 2001 From: MunifTanjim Date: Sat, 11 Aug 2018 21:19:32 +0600 Subject: [PATCH] add setup-popcorntime --- setup-popcorntime | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 setup-popcorntime diff --git a/setup-popcorntime b/setup-popcorntime new file mode 100755 index 0000000..c7651d2 --- /dev/null +++ b/setup-popcorntime @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +cd /tmp || exit + +_popcorntime_version=${1:-"0.3.10"} +_popcorntime_platform=${2:-"Linux-64"} + +echo "Downloading PopcornTime Source Archive..." +wget -q https://get.popcorntime.sh/build/Popcorn-Time-${_popcorntime_version}-${_popcorntime_platform}.tar.xz -O popcorntime.tar.xz +rm -rf PopcornTime && mkdir -p PopcornTime +tar -Jxf popcorntime.tar.xz -C ./PopcornTime +rm popcorntime.tar.xz + +echo "Installing to /opt/PopcornTime Directory..." +if [ -d "/opt/PopcornTime" ]; then + sudo rm -rf /opt/PopcornTime +fi +sudo mv PopcornTime /opt/PopcornTime + +echo "Creating Symbolic Link..." +if [ -L "/usr/bin/popcorntime" ]; then + sudo rm -f /usr/bin/popcorntime +fi +sudo ln -s /opt/PopcornTime/Popcorn-Time /usr/bin/popcorntime + +echo "Adding Application Shortcut..." +cat > ${HOME}/.local/share/applications/popcorntime.desktop <