File steamos-update of Package jupiter-hw-support

#!/usr/bin/bash

# The Steam client is known to call this script with the following parameter combinations:
# steamos-update --supports-duplicate-detection     -- should do nothing
# steamos-update --enable-duplicate-detection check -- should check for update
# steamos-update check                              -- should check for update
# steamos-update --enable-duplicate-detection       -- should perform an update
# steamos-update                                    -- should perform an update

STEAMOS_UPDATE_SCRIPT="/usr/libexec/gamescope-session-steam/system-updater"

while [[ $# -gt 0 ]]; do
  case $1 in
    check)
      CHECK=1
      shift
      ;;
    --supports-duplicate-detection)
      EXIT=1
      shift
      ;;
    *)
      shift
      ;;
  esac
done


if [ -x "$STEAMOS_UPDATE_SCRIPT" ]; then
	if [ -n "$CHECK" ]; then
		"$STEAMOS_UPDATE_SCRIPT" --check
	elif [ -n "$EXIT" ]; then
		exit 0
	else
		"$STEAMOS_UPDATE_SCRIPT"
	fi
else
    exit 7 # tells Steam client there is no update to perform
fi
openSUSE Build Service is sponsored by