summaryrefslogtreecommitdiff
path: root/SOURCES/generate_all_configs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'SOURCES/generate_all_configs.sh')
-rwxr-xr-xSOURCES/generate_all_configs.sh24
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