chore: Standardize all bash scripts on #!/usr/bin/bash

chore: Standardize all python scripts on #!/usr/bin/python3
chore: Update path for ds-inhibit patch
chore(readme): Remove unused package
This commit is contained in:
Kyle Gospodnetich 2023-12-22 19:22:29 -08:00
parent 0477691f59
commit cbdb1b3b5f
30 changed files with 93 additions and 101 deletions

View File

@ -230,7 +230,6 @@ Ported SteamOS and ChimeraOS packages, among others used by Bazzite, are built o
|[python3-hid](https://github.com/apmorton/pyhidapi)|![Build Status](https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite/package/python3-hid/status_image/last_build.png?)|
|rmlint|![Build Status](https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite/package/rmlint/status_image/last_build.png?)|
|[ryzenadj](https://github.com/FlyGoat/RyzenAdj)|![Build Status](https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite/package/ryzenadj/status_image/last_build.png?)|
|[sddm-sugar-steamOS](https://github.com/JiayuanWen/sddm-sugar-steamOS)|![Build Status](https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite/package/sddm-sugar-steamOS/status_image/last_build.png?)|
|[sdgyrodsu](https://github.com/kmicki/SteamDeckGyroDSU)|![Build Status](https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite/package/sdgyrodsu/status_image/last_build.png?)|
|steamdeck-dsp|![Build Status](https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite/package/steamdeck-dsp/status_image/last_build.png?)|
|steamdeck-gnome-presets|![Build Status](https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite/package/steamdeck-gnome-presets/status_image/last_build.png?)|

View File

@ -24,14 +24,14 @@ DualShock 4/DualSense mouse inhibitor
%prep
%setup -n %{name}-main
%patch 0
chmod +x ds-inhibit.py
chmod +x ds_inhibit.py
%build
%install
mkdir -p %{buildroot}%{_bindir}/
mkdir -p %{buildroot}%{_unitdir}/
cp -v ds-inhibit.py %{buildroot}%{_bindir}/ds-inhibit
cp -v ds_inhibit.py %{buildroot}%{_bindir}/ds-inhibit
cp -v systemd.service %{buildroot}%{_unitdir}/ds-inhibit.service
# Do post-installation

View File

@ -1,8 +1,8 @@
--- ds-inhibit.py
+++ ds-inhibit.py
--- ds_inhibit.py
+++ ds_inhibit.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/bin/env python3 -u
+#!/usr/bin/python3
# SPDX-License-Identifier: BSD-2-Clause
# vim:ts=4:sw=4:et
#

View File

@ -3,7 +3,7 @@ diff -ur usr/share/jupiter-fan-control/fancontrol.py usr/share/jupiter-fan-contr
+++ usr/share/jupiter-fan-control/fancontrol.py 2022-12-23 00:42:03.223412367 -0800
@@ -1,4 +1,4 @@
-#!/usr/bin/python -u
+#!/bin/env python3 -u
+#!/usr/bin/python3 -u
"""jupiter-fan-controller"""
import signal
import os
@ -12,7 +12,7 @@ diff -ur usr/share/jupiter-fan-control/PID.py usr/share/jupiter-fan-control/PID.
+++ usr/share/jupiter-fan-control/PID.py 2022-12-23 00:42:03.222412347 -0800
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/bin/env python3
+#!/usr/bin/python3
#
# This file is part of IvPID.
# Copyright (C) 2015 Ivmech Mechatronics Ltd. <bilgi@ivmech.com>

View File

@ -4,7 +4,7 @@ index 7b7a206..273a162 100755
+++ b/usr/bin/jupiter-biosupdate
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
set -e
## Environment overrides
@ -14,7 +14,7 @@ index bd56a57..0bef6f2 100755
+++ b/usr/bin/jupiter-check-support
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
set -e
@ -24,7 +24,7 @@ index 4f850b3..ce69763 100755
+++ b/usr/bin/jupiter-controller-update
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
set -euo pipefail
@ -34,7 +34,7 @@ index 1d7b792..c716d12 100755
+++ b/usr/bin/steamos-polkit-helpers/jupiter-biosupdate
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
set -eu
@ -44,7 +44,7 @@ index 9a442c8..862cec7 100755
+++ b/usr/bin/steamos-polkit-helpers/jupiter-check-support
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
set -eu
@ -54,7 +54,7 @@ index 15c695b..8733486 100755
+++ b/usr/bin/steamos-polkit-helpers/jupiter-dock-updater
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
set -eu
@ -64,7 +64,7 @@ index 2dfa176..ce77476 100755
+++ b/usr/bin/steamos-polkit-helpers/jupiter-fan-control
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
set -eu
@ -74,7 +74,7 @@ index 775b5f4..f97753b 100755
+++ b/usr/bin/steamos-polkit-helpers/jupiter-get-als-gain
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
set -eu
@ -84,7 +84,7 @@ index b93f523..1678640 100755
+++ b/usr/bin/steamos-polkit-helpers/steamos-devkit-mode
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
set -eu
@ -94,7 +94,7 @@ index 82b602c..ab77256 100755
+++ b/usr/bin/steamos-polkit-helpers/steamos-disable-wireless-power-management
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
set -eu
@ -104,7 +104,7 @@ index fa7698f..ba4ab84 100755
+++ b/usr/bin/steamos-polkit-helpers/steamos-enable-sshd
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
set -eu
@ -114,7 +114,7 @@ index 3a2a367..aaeb20a 100755
+++ b/usr/bin/steamos-polkit-helpers/steamos-factory-reset-config
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
set -eu
@ -124,7 +124,7 @@ index d9866a9..dcfe6b9 100755
+++ b/usr/bin/steamos-polkit-helpers/steamos-format-device
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
set -eu
@ -134,7 +134,7 @@ index 6d9859f..53b4f2a 100755
+++ b/usr/bin/steamos-polkit-helpers/steamos-format-sdcard
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
set -eu
@ -144,7 +144,7 @@ index 1841ce0..e7e234e 100755
+++ b/usr/bin/steamos-polkit-helpers/steamos-poweroff-now
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
set -eu
@ -154,7 +154,7 @@ index 907133b..1c0f6c6 100755
+++ b/usr/bin/steamos-polkit-helpers/steamos-priv-write
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
set -eu
@ -164,7 +164,7 @@ index b4dcc81..6dc8018 100755
+++ b/usr/bin/steamos-polkit-helpers/steamos-reboot-now
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
set -eu
@ -174,7 +174,7 @@ index ad466f2..60f9f8c 100755
+++ b/usr/bin/steamos-polkit-helpers/steamos-reboot-other
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
set -eu
@ -184,7 +184,7 @@ index 9e08cd6..189c805 100755
+++ b/usr/bin/steamos-polkit-helpers/steamos-restart-sddm
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
set -eu
@ -194,7 +194,7 @@ index 1b1d6c1..73f8547 100755
+++ b/usr/bin/steamos-polkit-helpers/steamos-select-branch
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
set -eu
@ -204,7 +204,7 @@ index f63e164..400ab9e 100755
+++ b/usr/bin/steamos-polkit-helpers/steamos-set-hostname
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
set -eu
@ -214,7 +214,7 @@ index 2811d82..a3935c4 100755
+++ b/usr/bin/steamos-polkit-helpers/steamos-set-timezone
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
set -eu
@ -224,7 +224,7 @@ index 38f92a1..296a6c7 100755
+++ b/usr/bin/steamos-polkit-helpers/steamos-trim-devices
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
set -eu
@ -234,7 +234,7 @@ index bae7403..1a7e948 100755
+++ b/usr/bin/steamos-polkit-helpers/steamos-update
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
set -eu
@ -244,7 +244,7 @@ index 6529e23..9de19b1 100755
+++ b/usr/lib/hwsupport/format-device.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
set -e
@ -254,7 +254,7 @@ index 36df682..3e13083 100755
+++ b/usr/lib/hwsupport/format-sdcard.sh
@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
exec /usr/lib/hwsupport/format-device.sh --device /dev/mmcblk0 "$@"
diff --git a/usr/lib/hwsupport/steamos-automount.sh b/usr/lib/hwsupport/steamos-automount.sh
@ -263,7 +263,7 @@ index 9e40c22..ce613b6 100755
+++ b/usr/lib/hwsupport/steamos-automount.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
set -euo pipefail
@ -273,7 +273,7 @@ index f5b3e8e..cc438af 100755
+++ b/usr/lib/hwsupport/trim-devices.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
set -e
@ -283,7 +283,7 @@ index 8089778..f0d591e 100755
+++ b/usr/share/jupiter_bios_updater/H2OFFTx64-G.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
TARGET_DIR=.
EXE_FILE=h2offt-g
@ -293,7 +293,7 @@ index ab3513f..9243bf3 100755
+++ b/usr/share/jupiter_bios_updater/H2OFFTx64.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
TARGET_DIR=.
EXE_FILE=h2offt
@ -317,7 +317,6 @@ index 5ee6d41..c662149 100755
import click
import crcmod
import datetime
diff --git a/usr/lib/hwsupport/power-button-handler.py b/usr/lib/hwsupport/power-button-handler.py
index 1a46251..73f2a3d 100755
--- a/usr/lib/hwsupport/power-button-handler.py
@ -335,6 +334,36 @@ index 1a46251..73f2a3d 100755
+++ jupiter-initial-firmware-update
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/sh
+#!/usr/bin/bash
set -euo pipefail
diff --git a/usr/bin/amd_system_info b/usr/bin/amd_system_info
index 1a46251..73f2a3d 100755
--- a/usr/bin/amd_system_info
+++ b/usr/bin/amd_system_info
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/bash
# script from AMD to use when reporting bugs to them
diff --git a/usr/bin/steamos-polkit-helpers/jupiter-amp-control b/usr/bin/steamos-polkit-helpers/jupiter-amp-control
index 1a46251..73f2a3d 100755
--- a/usr/bin/steamos-polkit-helpers/jupiter-amp-control
+++ b/usr/bin/steamos-polkit-helpers/jupiter-amp-control
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/bash
set -eu
diff --git a/usr/bin/steamos-polkit-helpers/steamos-retrigger-automounts b/usr/bin/steamos-polkit-helpers/steamos-retrigger-automounts
index 1a46251..73f2a3d 100755
--- a/usr/bin/steamos-polkit-helpers/steamos-retrigger-automounts
+++ b/usr/bin/steamos-polkit-helpers/steamos-retrigger-automounts
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/bash
# Helper to send reload to all active steamos-automount services, via pkexec if necessary/allowed

View File

@ -1,36 +0,0 @@
Name: sddm-sugar-steamOS
Version: {{{ git_dir_version }}}
Release: 1%{?dist}
Summary: Modified version of MarianArlt's Sugar theme for Simple Desktop Display Manager (SDDM), based on the aesthetic of Valve's SteamOS.
License: GPLv3
URL: https://github.com/KyleGospo/sddm-sugar-steamOS
Source0: %{url}/archive/refs/heads/master.zip
BuildArch: noarch
Requires: sddm
Requires: qt5-qtquickcontrols2
Requires: qt5-qtsvg
%global debug_package %{nil}
%description
A modified version of MarianArlt's Sugar Dark theme for Simple Desktop Display Manager (SDDM). Based on the aesthetic of Valve's SteamOS. Created for HoloISO.
%prep
%autosetup -n %{name}-master
rm -rf .github
rm %{name}.spec
%install
mkdir -p %{buildroot}%{_datadir}/sddm/themes/sugar-steamOS
cp -rv * %{buildroot}%{_datadir}/sddm/themes/sugar-steamOS/
rm -rf %{buildroot}%{_datadir}/sddm/themes/sugar-steamOS/Previews
rm -rf %{buildroot}%{_datadir}/sddm/themes/sugar-steamOS/ImageWIP
%files
%license COPYING
%{_datadir}/sddm/themes/sugar-steamOS/*
%changelog
{{{ git_dir_changelog }}}

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/bash
set -e

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/bash
source /etc/default/steamos-nested-desktop
# Remove the performance overlay, it meddles with some tasks

View File

@ -4,7 +4,7 @@ index 7cc1b05..22b345f 100755
+++ b/usr/bin/steamos-nested-desktop
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
+#!/usr/bin/bash
# Remove the performance overlay, it meddles with some tasks
unset LD_PRELOAD
@ -14,7 +14,7 @@ index 7cc1b05..22b345f 100755
cat <<EOF > $XDG_RUNTIME_DIR/nested_plasma/kwin_wayland_wrapper
-#!/bin/sh
-/usr/bin/kwin_wayland_wrapper --width 1280 --height 800 --no-lockscreen \$@
+#!/usr/bin/env bash
+#!/usr/bin/bash
+source /etc/default/steamos-nested-desktop
+
+/usr/bin/kwin_wayland_wrapper --width ${STEAMOS_NESTED_DESKTOP_WIDTH:-1280} --height ${STEAMOS_NESTED_DESKTOP_HEIGHT:-800} --no-lockscreen \$@

View File

@ -1,8 +1,8 @@
#!/bin/sh
#!/usr/bin/bash
set -eu
TARGETS=('/bin/bash /usr/bin/gamescope-session'
TARGETS=('/usr/bin/bash /usr/bin/gamescope-session'
'/usr/bin/kwin_x11')
for target in "${TARGETS[@]}"; do

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/bash
set -e

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/bash
set -e

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/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

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/bash
set -e
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/bash
set -e
if [[ $# -eq 1 ]]; then

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/bash
set -e
sudo mkdir -p /var/ublue-update/

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/bash
DBUS_SERVICE="com.system76.Scheduler"
DBUS_PATH="/com/system76/Scheduler"
DBUS_INTERFACE="com.system76.Scheduler"

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/bash
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
IMAGE_NAME=$(jq -r '."image-name"' < $IMAGE_INFO)

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/bash
ACTION="$1"
source /etc/default/cec-control

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/bash
source /etc/default/waydroid-launcher

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/bash
if [[ $(podman ps -a --no-trunc --format {{.Names}} | grep -E '(^|\s)bazzite-arch($|\s)') ]]; then
unset SUDO_USER # avoid distrobox sudo checks

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/bash
# Enable NTP
timedatectl set-ntp true

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/bash
source /etc/default/waydroid-launcher

View File

@ -1,3 +1,3 @@
#!/usr/bin/env bash
#!/usr/bin/bash
sudo systemctl stop waydroid-container.service

View File

@ -1,3 +1,3 @@
#!/usr/bin/env bash
#!/usr/bin/bash
sudo sh -c 'for i in $(seq 7 9); do echo add > /sys/class/input/event$i/uevent; done'

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/bash
# Simply launches the "yafti" GUI with the uBlue image's configuration.
/usr/bin/yafti /usr/share/ublue-os/firstboot/yafti.yml

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/bash
shopt -s nullglob
if [ -d "$HOME/homebrew/themes/Adwaita-for-Steam" ]; then

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/bash
shopt -s nullglob
# Flatpak Firefox

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/bash
set -oue pipefail