Skip to content

Commit

Permalink
xpadneo, installer: Exit immediately on error
Browse files Browse the repository at this point in the history
Fixes a problem where the installer would not exit if the git clone is
not properly set up.

Link: #491 (comment)
Signed-off-by: Kai Krakow <[email protected]>
  • Loading branch information
kakra committed Dec 19, 2024
1 parent 227c101 commit 875d5aa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
6 changes: 3 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash

cd "$(dirname "$0")" || exit 1
set -e

cd "$(dirname "$0")"
source "lib/options.sh"
source "lib/installer.sh"

Expand All @@ -12,8 +14,6 @@ fi

if [[ -z "${INSTALLED[*]}" ]]; then

set -e

echo "* creating dkms.conf"
sed 's/"@DO_NOT_CHANGE@"/"'"${VERSION}"'"/g' <hid-xpadneo/dkms.conf.in >hid-xpadneo/dkms.conf

Expand Down
7 changes: 4 additions & 3 deletions uninstall.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash

cd "$(dirname "$0")" || exit 1
set -e

cd "$(dirname "$0")"
source "lib/options.sh"
source "lib/installer.sh"

Expand All @@ -10,8 +12,7 @@ modprobe -r hid_xpadneo || true
echo "* looking for registered instances"
echo "found ${#INSTALLED[@]} registered instance(s) on your system"

set -e

# NOTE: overrides VERSION from lib/installer.sh but we don't need it
for VERSION in "${INSTALLED[@]}"; do
echo "* ${VERSION}"

Expand Down
4 changes: 3 additions & 1 deletion update.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash

cd "$(dirname "$0")" || exit 1
set -e

cd "$(dirname "$0")"
source "lib/installer.sh"

LATEST=$(get_upstream_version_latest)
Expand Down

0 comments on commit 875d5aa

Please sign in to comment.