From bb742d5b9693eab597a4b829025e9b2f54a55f43 Mon Sep 17 00:00:00 2001 From: "Josh.5" Date: Sun, 16 Jan 2022 02:32:41 +1300 Subject: [PATCH] Add Protonup installer --- overlay/opt/scripts/install_protonup.sh | 33 +++++++++++++++++++ .../usr/share/applications/protonup.desktop | 7 ++++ 2 files changed, 40 insertions(+) create mode 100644 overlay/opt/scripts/install_protonup.sh create mode 100644 overlay/usr/share/applications/protonup.desktop diff --git a/overlay/opt/scripts/install_protonup.sh b/overlay/opt/scripts/install_protonup.sh new file mode 100644 index 0000000..748031c --- /dev/null +++ b/overlay/opt/scripts/install_protonup.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +### +# File: install_lutris.sh +# Project: scripts +# File Created: Thursday, 1st January 1970 12:45:00 pm +# Author: Console and webGui login account (jsunnex@gmail.com) +# ----- +# Last Modified: Sunday, 16th January 2022 2:17:35 am +# Modified By: Console and webGui login account (jsunnex@gmail.com) +### + +pkg=protonup +script_path=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ); +script_name=$( basename "${BASH_SOURCE[0]}" ) + + +install() { + if ! command -v ${pkg} >/dev/null; then + # Install application + python3 -m pip install ${pkg} + # Set installation path as user + # Note: Run command with su because init processes are run as root but this is a user thing... + su ${USER} -c "${pkg} -d '/home/${USER}/.steam/root/compatibilitytools.d/'" + # Update to the latest version on startup using the users Downloads directory + su ${USER} -c "${pkg} -y -o '/home/${USER}/Downloads/'" & + fi + # Make sure the desktop icon is removed + rm -f /usr/share/applications/protonup.desktop +} + + +#INSTALLER: +source "${script_path}/installer.sh" diff --git a/overlay/usr/share/applications/protonup.desktop b/overlay/usr/share/applications/protonup.desktop new file mode 100644 index 0000000..c6bac49 --- /dev/null +++ b/overlay/usr/share/applications/protonup.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=Installer - Protonup +Categories=Game; +Exec=/opt/scripts/install_protonup.sh %U +Icon=installsoftware +Terminal=true +Type=Application