Skip to content

Commit

Permalink
Update install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDoobPG authored Dec 29, 2019
1 parent 0687083 commit f47a6b3
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions menu/functions/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ source /opt/plexguide/menu/functions/functions.sh
source /opt/plexguide/menu/functions/serverid.sh
source /opt/plexguide/menu/functions/emergency.sh
source /opt/plexguide/menu/functions/serverid.sh
source /opt/plexguide/menu/functions/update.sh
#######################################################

pginstall() {
versionubucheck
Expand Down Expand Up @@ -196,12 +198,21 @@ rcversion="$(curl -s https://api.github.com/repos/rclone/rclone/releases/latest
rcstored="$(rclone --version | awk '{print $2}' | tail -n 3 | head -n 1 )"

if [[ "$rcversion" != "$rcstored" ]]; then
printf '
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ rclone can be updated to version $rcstored
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
'
sleep 15s
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ rclone can be updated to version $rcversion
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
read -p '↘️ Type Y or N | Press [ENTER]: ' typed </dev/tty

case $typed in
Y) rcloneupdate ;;
y) rcloneupdate ;;
N) exit ;;
n) exit ;;
*) rcloneinstall ;;
esac
sleep 15s
fi
}

Expand Down

0 comments on commit f47a6b3

Please sign in to comment.