diff options
author | Jan200101 <sentrycraft123@gmail.com> | 2021-03-21 13:18:24 +0100 |
---|---|---|
committer | Jan200101 <sentrycraft123@gmail.com> | 2021-03-21 13:18:24 +0100 |
commit | 0d03bbfed690ac4a025e90346a673b8607742122 (patch) | |
tree | 27a7d9904a5e5409c7efadf64e5c126946bc5bf2 /SOURCES/generate_all_configs.sh | |
parent | d6d4fd75919f9e864611d09547f97e7136e1b22d (diff) | |
download | kernel-fsync-0d03bbfed690ac4a025e90346a673b8607742122.tar.gz kernel-fsync-0d03bbfed690ac4a025e90346a673b8607742122.zip |
kernel 5.11.7
Diffstat (limited to 'SOURCES/generate_all_configs.sh')
-rwxr-xr-x | SOURCES/generate_all_configs.sh | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/SOURCES/generate_all_configs.sh b/SOURCES/generate_all_configs.sh index 14f0f3a..9e3d5ec 100755 --- a/SOURCES/generate_all_configs.sh +++ b/SOURCES/generate_all_configs.sh @@ -9,28 +9,32 @@ PRIMARY=$1 DEBUGBUILDSENABLED=$2 -if [ -z $2 ]; then +if [ -z "$2" ]; then exit 1 fi -if [ $PRIMARY == "fedora" ]; then +if [ -z "$PRIMARY" ]; then + PRIMARY=rhel +fi + +if [ "$PRIMARY" = "fedora" ]; then SECONDARY=rhel else SECONDARY=fedora fi -for i in kernel-*-$PRIMARY.config; do - NEW=kernel-$VERSION-`echo $i | cut -d - -f2- | sed s/-$PRIMARY//` +for i in kernel-*-"$PRIMARY".config; do + NEW=kernel-"$VERSION"-$(echo "$i" | cut -d - -f2- | sed s/-"$PRIMARY"//) #echo $NEW - mv $i $NEW + mv "$i" "$NEW" done -rm kernel-*-$SECONDARY.config +rm -f kernel-*-"$SECONDARY".config -if [ $DEBUGBUILDSENABLED -eq 0 ]; then +if [ "$DEBUGBUILDSENABLED" -eq 0 ]; then for i in kernel-*debug*.config; do - base=`echo $i | sed -r s/-?debug//g` - NEW=kernel-`echo $base | cut -d - -f2-` - mv $i $NEW + base=$(echo "$i" | sed -r s/-?debug//g) + NEW=kernel-$(echo "$base" | cut -d - -f2-) + mv "$i" "$NEW" done fi |