From 12c50f7939c02db85f05830c4b9fccf464b3977a Mon Sep 17 00:00:00 2001 From: Francis Rowe Date: Wed, 10 Jun 2015 20:30:48 -0400 Subject: all script: use a standard style Based on the style used for the script in resources/scripts/helpers/build/release/ --- (limited to 'resources/scripts/helpers/build/module/flashrom') 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" -- cgit v0.9.1