summaryrefslogtreecommitdiffstats
path: root/resources/scripts/helpers/build/module/flashrom
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2015-06-10 20:30:48 (EDT)
committer Francis Rowe <info@gluglug.org.uk>2015-06-10 20:30:48 (EDT)
commit12c50f7939c02db85f05830c4b9fccf464b3977a (patch)
tree42c0b72ee957cc2f70b442cefb14923b06cb8507 /resources/scripts/helpers/build/module/flashrom
parent34270811fce1ecf0bcf3b1363b0dc3dbf284ab09 (diff)
downloadlibreboot-12c50f7939c02db85f05830c4b9fccf464b3977a.zip
libreboot-12c50f7939c02db85f05830c4b9fccf464b3977a.tar.gz
libreboot-12c50f7939c02db85f05830c4b9fccf464b3977a.tar.bz2
all script: use a standard style
Based on the style used for the script in resources/scripts/helpers/build/release/
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 a6cf612..0d2d1bf 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"