Skip to content

Commit

Permalink
Update/Uninstall desktop shorcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
kmicki committed Jan 23, 2024
1 parent dc3925e commit 07700e1
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 27 deletions.
31 changes: 4 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,13 @@

## Install/Update

In **Steam Deck**'s desktop mode, open *Konsole*.
Open this page in the browser in **Steam Deck**'s desktop mode.

Execute command:
Download [Update File](https://github.com/kmicki/SteamDeckGyroDSU/releases/latest/download/update-sdgyrodsu.desktop), save it to Desktop and run it by touching or double-clicking *Update GyroDSU*.

bash <(curl -sL https://raw.githubusercontent.com/kmicki/SteamDeckGyroDSU/master/pkg/update.sh)

Above command will download the binary package and install it. It can be also used to update to the newest version at any time.

When **SteamDeckGyroDSU** is already installed, it can also be updated by running following command:

$HOME/sdgyrodsu/update.sh

To uninstall:

$HOME/sdgyrodsu/uninstall.sh

### Remarks about update from version 1.*

Versions **1.\*** of **SteamDeckGyroDSU** required superuser access to be installed.

Versions **2.0** and above don't need it.

Still, after update from **1.\*** to **2.0** or higher, the changes done with superuser access will be left in the system.
Uninstall script will not remove them anymore since version **2.0**.

Reverting those changes is not necessary but can be done by executing following command (requires superuser access):

$HOME/sdgyrodsu/v1cleanup.sh
This Desktop shortcut may be used also to update the *SteamDeckGyroDSU* to the most recent version.

after version **2.0** or above is installed.
To uninstall, run *Uninstall GyroDSU* from Desktop by touching or double-clicking.

## Usage

Expand Down
10 changes: 10 additions & 0 deletions pkg/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,14 @@ if systemctl --user -q enable --now sdgyrodsu.service >/dev/null; then
else
echo -e "\e[1mFailed enabling the service.\e[0m"
exit 28
fi

echo "Setting up desktop shortcuts..."
cp update-sdgyrodsu.desktop $HOME/Desktop/ >/dev/null
if chmod +x $HOME/Desktop/update-sdgyrodsu.desktop >/dev/null; then
echo "Update shortcut copied."
fi
cp uninstall-sdgyrodsu.desktop $HOME/Desktop/ >/dev/null
if chmod +x $HOME/Desktop/uninstall-sdgyrodsu.desktop >/dev/null; then
echo "Uninstall shortcut copied."
fi
8 changes: 8 additions & 0 deletions pkg/uninstall-sdgyrodsu.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Desktop Entry]
Exec=~/sdgyrodsu/uninstall.sh
Icon=delete
Name[en_US]=Uninstall GyroDSU
Name=Uninstall GyroDSU
StartupNotify=false
Terminal=true
Type=Application
3 changes: 3 additions & 0 deletions pkg/uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ rm $HOME/sdgyrodsu/update.sh >/dev/null 2>&1
rm $HOME/sdgyrodsu/uninstall.sh >/dev/null 2>&1
rm $HOME/sdgyrodsu/v1cleanup.sh >/dev/null 2>&1
rm $HOME/sdgyrodsu/logcurrentrun.sh >/dev/null 2>&1
rm $HOME/Desktop/uninstall-sdgyrodsu.desktop >/dev/null 2>&1
rm -d $HOME/sdgyrodsu >/dev/null 2>&1

echo "Uninstalling complete."

read -n 1 -s -r -p "Finished. Press any key to exit."
echo " "
8 changes: 8 additions & 0 deletions pkg/update-sdgyrodsu.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Desktop Entry]
Exec=bash <(curl -sL https://raw.githubusercontent.com/kmicki/SteamDeckGyroDSU/master/pkg/update.sh)
Icon=keyboard-caps-disabled
Name[en_US]=Update GyroDSU
Name=Update GyroDSU
StartupNotify=false
Terminal=true
Type=Application

0 comments on commit 07700e1

Please sign in to comment.