diff options
author | Jan200101 <sentrycraft123@gmail.com> | 2023-11-19 03:36:24 +0100 |
---|---|---|
committer | Jan200101 <sentrycraft123@gmail.com> | 2023-11-19 03:36:24 +0100 |
commit | fd2abdd6bc1d035b90c0b5238bdc097461bc87ab (patch) | |
tree | 0fced873b61338b6f349ff1dcbe4db97ea294db3 /TOOLS/bumpspec.sh | |
parent | d258683ce35c01f79fa749fbc64dfdab53d0e69e (diff) | |
download | kernel-fsync-fd2abdd6bc1d035b90c0b5238bdc097461bc87ab.tar.gz kernel-fsync-fd2abdd6bc1d035b90c0b5238bdc097461bc87ab.zip |
kernel 6.5.11 Steam Deck fixes
add patching scripts, update configs for the Steam Deck (Dual Role Device support is now required for USB interfacing)
Diffstat (limited to 'TOOLS/bumpspec.sh')
-rwxr-xr-x | TOOLS/bumpspec.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/TOOLS/bumpspec.sh b/TOOLS/bumpspec.sh new file mode 100755 index 0000000..00062b8 --- /dev/null +++ b/TOOLS/bumpspec.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +set -eu + +if [[ $# != 2 ]]; then + >&2 echo "error: bumpspec requires 2 arguments" + exit 1 +fi + +COMMENT="${1}" +SPEC="${2}" + +SPECRELEASE="$(grep "%define specrelease " ${SPEC})" +# assumes the release number is 3 digits +SPECRELEASE_NUMBER="$(echo ${SPECRELEASE} | cut -b 21-23)" + +NEW_SPECRELEASE_NUMBER="$(( ${SPECRELEASE_NUMBER} + 1))" +NEW_SPECRELEASE="${SPECRELEASE/${SPECRELEASE_NUMBER}/${NEW_SPECRELEASE_NUMBER}}" + +echo ${NEW_SPECRELEASE} + +sed -i "s|${SPECRELEASE}|${NEW_SPECRELEASE}|g" ${SPEC} + +rpmdev-bumpspec --comment="${COMMENT}" ${SPEC} + +sed -i "s|%{pkg_release}.1|%{pkg_release}|g" ${SPEC} |