aboutsummaryrefslogtreecommitdiff
path: root/resources/scripts/helpers/build/module/flashrom
diff options
context:
space:
mode:
Diffstat (limited to 'resources/scripts/helpers/build/module/flashrom')
-rwxr-xr-xresources/scripts/helpers/build/module/flashrom24
1 files changed, 12 insertions, 12 deletions
diff --git a/resources/scripts/helpers/build/module/flashrom b/resources/scripts/helpers/build/module/flashrom
index a6cf6129..0d2d1bff 100755
--- a/resources/scripts/helpers/build/module/flashrom
+++ b/resources/scripts/helpers/build/module/flashrom
@@ -29,20 +29,20 @@ set -u -e
printf "Building flashrom\n"
-cd flashrom/
+cd "flashrom/"
make clean
if (( $# != 1 )); then
make
else
- if [ "$1" = "static" ]; then
+ if [ "${1}" = "static" ]; then
make SHARED=0 CC='gcc -static'
else
make
fi
fi
-mv flashrom flashrom_normal
+mv "flashrom" "flashrom_normal"
# build patched binaries for MX25L1605D and SST25VF016B flash chips
# - these patches are needed for initial installation on an X60 or T60
@@ -50,18 +50,18 @@ mv flashrom flashrom_normal
for patchname in "lenovobios_macronix" "lenovobios_sst"
do
# first remove the existing build
- rm -f flashrom_"$patchname"
+ rm -f "flashrom_${patchname}"
# backup the unpatched flashchips.c (it will be patched)
- cp flashchips.c flashchips.c_
+ cp "flashchips.c" "flashchips.c_"
# patch flashchips.c
- patch flashchips.c < ../resources/flashrom/patch/"$patchname".diff
+ patch "flashchips.c" < "../resources/flashrom/patch/${patchname}.diff"
make clean
if (( $# != 1 )); then
make
else
- if [ "$1" = "static" ]; then
+ if [ "${1}" = "static" ]; then
make SHARED=0 CC='gcc -static'
else
make
@@ -69,16 +69,16 @@ do
fi
# Rename the binary based on the patch name
- mv flashrom flashrom_"$patchname"
+ mv "flashrom" "flashrom_${patchname}"
# restore unpatched flashchips.c
- rm -f flashchips.c
- mv flashchips.c_ flashchips.c
+ rm -f "flashchips.c"
+ mv "flashchips.c_" "flashchips.c"
done
-mv flashrom_normal flashrom
+mv "flashrom_normal" "flashrom"
-cd ../
+cd "../"
printf "\n\n"