From a57f26f2c62805b9e61719361ca17ccf53c897ad Mon Sep 17 00:00:00 2001 From: Francis Rowe Date: Sat, 29 Aug 2015 23:47:29 -0400 Subject: all scripts: general fixes and clean up --- (limited to 'resources/scripts') diff --git a/resources/scripts/helpers/build/clean/bucts b/resources/scripts/helpers/build/clean/bucts index 2d3f9bb..84bd4da 100755 --- a/resources/scripts/helpers/build/clean/bucts +++ b/resources/scripts/helpers/build/clean/bucts @@ -36,5 +36,3 @@ printf "\n\n" # done. go back to main directory. cd "../" - -# ------------------- DONE ---------------------- diff --git a/resources/scripts/helpers/build/clean/coreboot b/resources/scripts/helpers/build/clean/coreboot index 1eb8ab3..58d13bc 100755 --- a/resources/scripts/helpers/build/clean/coreboot +++ b/resources/scripts/helpers/build/clean/coreboot @@ -56,5 +56,3 @@ make crossgcc-clean cd "../" printf "\n\n" - -# ------------------- DONE ---------------------- diff --git a/resources/scripts/helpers/build/clean/flashrom b/resources/scripts/helpers/build/clean/flashrom index d7eba90..2a16adc 100755 --- a/resources/scripts/helpers/build/clean/flashrom +++ b/resources/scripts/helpers/build/clean/flashrom @@ -40,5 +40,3 @@ rm -f "flashrom_lenovobios_macronix" cd "../" printf "\n\n" - -# ------------------- DONE ---------------------- diff --git a/resources/scripts/helpers/build/clean/grub b/resources/scripts/helpers/build/clean/grub index cf22c8a..af657f0 100755 --- a/resources/scripts/helpers/build/clean/grub +++ b/resources/scripts/helpers/build/clean/grub @@ -36,5 +36,3 @@ printf "Cleaning the previous build of GRUB\n" cd "../" printf "\n\n" - -# ------------------- DONE ---------------------- diff --git a/resources/scripts/helpers/build/clean/i945pwm b/resources/scripts/helpers/build/clean/i945pwm index 1183859..3e1d66d 100755 --- a/resources/scripts/helpers/build/clean/i945pwm +++ b/resources/scripts/helpers/build/clean/i945pwm @@ -32,5 +32,3 @@ cd "resources/utilities/i945-pwm/" make clean cd "../../../" printf "\n\n" - -# ------------------- DONE ---------------------- diff --git a/resources/scripts/helpers/build/clean/ich9deblob b/resources/scripts/helpers/build/clean/ich9deblob index cfca981..2c952ac 100755 --- a/resources/scripts/helpers/build/clean/ich9deblob +++ b/resources/scripts/helpers/build/clean/ich9deblob @@ -32,5 +32,3 @@ cd "resources/utilities/ich9deblob/" make clean cd "../../../" printf "\n\n" - -# ------------------- DONE ---------------------- diff --git a/resources/scripts/helpers/build/clean/memtest86plus b/resources/scripts/helpers/build/clean/memtest86plus index 6f3db44..e6a9218 100755 --- a/resources/scripts/helpers/build/clean/memtest86plus +++ b/resources/scripts/helpers/build/clean/memtest86plus @@ -37,5 +37,3 @@ make clean cd "../" printf "\n\n" - -# ------------------- DONE ---------------------- diff --git a/resources/scripts/helpers/build/clean/rom_images b/resources/scripts/helpers/build/clean/rom_images index e952d5c..f0c342a 100755 --- a/resources/scripts/helpers/build/clean/rom_images +++ b/resources/scripts/helpers/build/clean/rom_images @@ -31,5 +31,3 @@ set -u -e rm -Rf "bin/" printf "Deleted the bin/ directory containing the ROM images.\n\n" - -# ------------------- DONE ---------------------- diff --git a/resources/scripts/helpers/build/config/corebootmodify b/resources/scripts/helpers/build/config/corebootmodify index 890426e..6261d0b 100755 --- a/resources/scripts/helpers/build/config/corebootmodify +++ b/resources/scripts/helpers/build/config/corebootmodify @@ -30,7 +30,7 @@ cd "resources/libreboot/config/grub/" if [ $# -lt 1 ]; then configs="$(for config in *; do printf "%s\n" "${config}"; done)" else - configs="$@" + configs="${*}" fi cd "../../../../coreboot/" diff --git a/resources/scripts/helpers/build/config/corebootreplace b/resources/scripts/helpers/build/config/corebootreplace index 140372d..d5fdcb2 100755 --- a/resources/scripts/helpers/build/config/corebootreplace +++ b/resources/scripts/helpers/build/config/corebootreplace @@ -30,7 +30,7 @@ cd "resources/libreboot/config/grub/" if [ $# -lt 1 ]; then configs="$(for config in *; do printf "%s\n" "${config}"; done)" else - configs="$@" + configs="${*}" fi cd "../../../../coreboot/" diff --git a/resources/scripts/helpers/build/config/corebootupdate b/resources/scripts/helpers/build/config/corebootupdate index a53df79..64fcd75 100755 --- a/resources/scripts/helpers/build/config/corebootupdate +++ b/resources/scripts/helpers/build/config/corebootupdate @@ -30,7 +30,7 @@ cd "resources/libreboot/config/grub/" if [ $# -lt 1 ]; then configs="$(for i in *; do printf "%s\n" "${i}"; done)" else - configs="$@" + configs="${*}" fi cd "../../../../coreboot/" diff --git a/resources/scripts/helpers/build/dependencies/parabola b/resources/scripts/helpers/build/dependencies/parabola index 692fdf7..92a88be 100755 --- a/resources/scripts/helpers/build/dependencies/parabola +++ b/resources/scripts/helpers/build/dependencies/parabola @@ -53,7 +53,7 @@ pacman -S arm-none-eabi-gcc pacman -S --needed libpciaccess # For cross-compiling i686 target on x86_64 host. -if [ $(uname -i) = "x86_64" ] || [ $(uname -m) = "x86_64" ] +if [ "$(uname -i)" = "x86_64" ] || [ "$(uname -m)" = "x86_64" ] then printf "Cross-Compiling: You are running on 64-bit architecture, however 32-bit libraries are needed\n" pacman -Sl --needed multilib 1&>/dev/null || (printf "You must enable the multilib repository in /etc/pacman.conf first\n"; exit 1) @@ -78,7 +78,7 @@ pacman -S ncurses doxygen iasl gdb flex bison # pacman -S git base-devel # For cross-compiling i686 target on x86_64 host. -if [ $(uname -i) = "x86_64" ] || [ $(uname -m) = "x86_64" ] +if [ "$(uname -i)" = "x86_64" ] || [ "$(uname -m)" = "x86_64" ] then printf "Cross-Compiling: You are running on 64-bit architecture, however 32-bit libraries are needed\n" pacman -S --needed lib32-ncurses @@ -104,6 +104,3 @@ pacman -S --needed bdf-unifont # trying this, otherwise there was an error. I'll printf "Flashrom: Your external programmer will be most probably using PCI bus, FTDI chips need additional libraries\n" pacman -S --needed pciutils zlib libftdi libftdi-compat # pacman -S --needed base-devel subversion - -# ------------------- DONE ---------------------- - diff --git a/resources/scripts/helpers/build/dependencies/trisquel7 b/resources/scripts/helpers/build/dependencies/trisquel7 index 0a3a268..d3027f9 100755 --- a/resources/scripts/helpers/build/dependencies/trisquel7 +++ b/resources/scripts/helpers/build/dependencies/trisquel7 @@ -47,7 +47,7 @@ apt-get -y install build-essential apt-get -y install gcc-arm-linux-gnueabi # For cross-compiling i686 target on x86_64 host. -if [ $(uname -i) = "x86_64" ] || [ $(uname -m) = "x86_64" ] +if [ "$(uname -i)" = "x86_64" ] || [ "$(uname -m)" = "x86_64" ] then apt-get -y install gcc-multilib libc6-i386 libc6-dev-i386 apt-get -y install lib32stdc++6 g++-multilib dh-autoreconf @@ -71,7 +71,7 @@ apt-get -y install build-essential apt-get -y install libncurses5-dev doxygen iasl gdb flex bison build-essential git # For cross-compiling i686 target on x86_64 host. -if [ $(uname -i) = "x86_64" ] || [ $(uname -m) = "x86_64" ] +if [ "$(uname -i)" = "x86_64" ] || [ "$(uname -m)" = "x86_64" ] then apt-get -y install lib32ncurses5-dev fi @@ -92,10 +92,7 @@ apt-get -y install build-essential apt-get -y install libpci-dev pciutils zlib1g-dev libftdi-dev build-essential subversion # For cross-compiling i686 target on x86_64 host. -if [ $(uname -i) = "x86_64" ] || [ $(uname -m) = "x86_64" ] +if [ "$(uname -i)" = "x86_64" ] || [ "$(uname -m)" = "x86_64" ] then apt-get -y install lib32z1-dev fi - -# ------------------- DONE ---------------------- - diff --git a/resources/scripts/helpers/build/module/bucts b/resources/scripts/helpers/build/module/bucts index 08ed951..c142c76 100755 --- a/resources/scripts/helpers/build/module/bucts +++ b/resources/scripts/helpers/build/module/bucts @@ -44,7 +44,7 @@ if [ "${buildtype}" = "static" ]; then fi make clean -make -j$(nproc) +make -j"$(nproc)" if [ "${buildtype}" = "static" ]; then patch "Makefile" -R < "../resources/bucts/patch/staticlink.diff" @@ -54,5 +54,3 @@ fi cd "../" printf "\n\n" - -# ------------------- DONE ---------------------- diff --git a/resources/scripts/helpers/build/module/coreboot b/resources/scripts/helpers/build/module/coreboot index c939068..756ca1c 100755 --- a/resources/scripts/helpers/build/module/coreboot +++ b/resources/scripts/helpers/build/module/coreboot @@ -38,7 +38,7 @@ cd "coreboot/" # cbfstool cd "util/cbfstool/" -make -j$(nproc) +make -j"$(nproc)" # done. go back to coreboot dir cd "../../" @@ -47,5 +47,3 @@ cd "../../" cd "../" printf "\n\n" - -# ------------------- DONE ---------------------- diff --git a/resources/scripts/helpers/build/module/flashrom b/resources/scripts/helpers/build/module/flashrom index b37299e..c4cb380 100755 --- a/resources/scripts/helpers/build/module/flashrom +++ b/resources/scripts/helpers/build/module/flashrom @@ -34,12 +34,12 @@ cd "flashrom/" make clean if (( $# != 1 )); then - make -j$(nproc) + make -j"$(nproc)" else if [ "${1}" = "static" ]; then - make SHARED=0 CC='gcc -static' -j$(nproc) + make SHARED=0 CC='gcc -static' -j"$(nproc)" else - make -j$(nproc) + make -j"$(nproc)" fi fi @@ -60,12 +60,12 @@ do make clean if (( $# != 1 )); then - make -j$(nproc) + make -j"$(nproc)" else if [ "${1}" = "static" ]; then - make SHARED=0 CC='gcc -static' -j$(nproc) + make SHARED=0 CC='gcc -static' -j"$(nproc)" else - make -j$(nproc) + make -j"$(nproc)" fi fi @@ -82,6 +82,3 @@ mv "flashrom_normal" "flashrom" cd "../" printf "\n\n" - -# ------------------- DONE ---------------------- - diff --git a/resources/scripts/helpers/build/module/grub b/resources/scripts/helpers/build/module/grub index fe073d6..0e424a4 100755 --- a/resources/scripts/helpers/build/module/grub +++ b/resources/scripts/helpers/build/module/grub @@ -38,11 +38,9 @@ cd "grub/" # build grub ./autogen.sh ./configure --with-platform=coreboot -make -j$(nproc) +make -j"$(nproc)" printf "\n\n" # done. go back to main directory cd "../" - -# ------------------- DONE ---------------------- diff --git a/resources/scripts/helpers/build/module/i945pwm b/resources/scripts/helpers/build/module/i945pwm index c263b25..0db8270 100755 --- a/resources/scripts/helpers/build/module/i945pwm +++ b/resources/scripts/helpers/build/module/i945pwm @@ -34,11 +34,9 @@ cd "resources/utilities/i945-pwm/" make clean # build it -make -j$(nproc) +make -j"$(nproc)" # done. go back to main directory cd "../../../" printf "\n\n" - -# ------------------- DONE ---------------------- diff --git a/resources/scripts/helpers/build/module/ich9deblob b/resources/scripts/helpers/build/module/ich9deblob index 7622b87..2ca54c7 100755 --- a/resources/scripts/helpers/build/module/ich9deblob +++ b/resources/scripts/helpers/build/module/ich9deblob @@ -36,11 +36,9 @@ cd "resources/utilities/ich9deblob/" make clean # build ich9deblob -make -j$(nproc) +make -j"$(nproc)" # done. go back to main directory cd "../../../" printf "\n\n" - -# ------------------- DONE ---------------------- diff --git a/resources/scripts/helpers/build/module/memtest86plus b/resources/scripts/helpers/build/module/memtest86plus index 3e9feb1..772acf1 100755 --- a/resources/scripts/helpers/build/module/memtest86plus +++ b/resources/scripts/helpers/build/module/memtest86plus @@ -36,11 +36,9 @@ cd "memtest86plus/" make clean # build memtest86+ -make -j$(nproc) +make -j"$(nproc)" # done. go back to main directory cd "../" printf "\n\n" - -# ------------------- DONE ---------------------- diff --git a/resources/scripts/helpers/build/release/docs b/resources/scripts/helpers/build/release/docs index 38a0999..54faac5 100755 --- a/resources/scripts/helpers/build/release/docs +++ b/resources/scripts/helpers/build/release/docs @@ -40,7 +40,7 @@ distdir="${versiondir}/${distname}" printf 'Deleting old documentation release archives\n' rm -f "${distdir}.tar.xz" -rm -Rf "${distdir}/" +rm -Rf "${distdir:?}/" mkdir -p "${distdir}/" cp -r docs/* "${distdir}/" @@ -50,6 +50,6 @@ printf '%s\n' "${version}" >"${distdir}/version" printf 'Creating compressed documentation archive at %s\n' "${distdir}.tar.xz" (cd "${versiondir}/" && tar -c "${distname}/" | xz -9e >"${distname}.tar.xz") -rm -Rf "${distdir}/" +rm -Rf "${distdir:?}/" printf 'Documentation release archive is stored in %s/\n' "${versiondir}" diff --git a/resources/scripts/helpers/build/release/roms b/resources/scripts/helpers/build/release/roms index 14c05ad..c6c5c5c 100755 --- a/resources/scripts/helpers/build/release/roms +++ b/resources/scripts/helpers/build/release/roms @@ -66,7 +66,7 @@ for payload in *; do # Create the compressed archive. tar -c "${archivename}/" | xz -9e >"../../${romdir}/${payload}/${archivename}.tar.xz" - rm -Rf "${archivename}/" + rm -Rf "${archivename:?}/" printf ' OK\n' diff --git a/resources/scripts/helpers/build/release/sha512sums b/resources/scripts/helpers/build/release/sha512sums index ab14ca4..456764b 100755 --- a/resources/scripts/helpers/build/release/sha512sums +++ b/resources/scripts/helpers/build/release/sha512sums @@ -45,7 +45,7 @@ rm -f "${sha512filepath}" # create sha512sum file printf "Creating list of SHA512 sums in %s...\n" "${sha512filepath}" -(cd "${versiondir}/" && for file in $(find -type f); do sha512sum $file >> "${sha512filename}"; done) +(cd "${versiondir}/" && for file in $(find -type f); do sha512sum "${file}" >> "${sha512filename}"; done) printf "...done.\n" printf "\n" diff --git a/resources/scripts/helpers/build/release/src b/resources/scripts/helpers/build/release/src index 60356e8..6d9f666 100755 --- a/resources/scripts/helpers/build/release/src +++ b/resources/scripts/helpers/build/release/src @@ -38,7 +38,7 @@ distdir="${versiondir}/${distname}" printf 'Deleting old source release archives\n' rm -f "${distdir}.tar.xz" -rm -Rf "${distdir}/" +rm -Rf "${distdir:?}/" mkdir -p "${distdir}/" @@ -77,7 +77,6 @@ rm -Rf "${distdir}/resources/utilities/coreboot-libre/" # in the src release archive rm -f "${distdir}/download" rm -Rf "${distdir}/resources/scripts/helpers/download/" -rm -Rf "${distdir}/resources/scripts/helpers/sha512sums/" # The release archive for _src does not include docs, so it # is nonsense to include the script for it there @@ -102,6 +101,6 @@ rm -f "${distdir}/resources/utilities/grub-assemble/grub_vesafb.elf" printf 'Creating %s.tar.xz\n' "${distdir}" (cd "${versiondir}/" && tar -c "${distname}/" | xz -9e >"${distname}.tar.xz") -rm -Rf "${distdir}/" +rm -Rf "${distdir:?}/" printf 'Source release archive is stored in %s/\n' "${versiondir}" diff --git a/resources/scripts/helpers/build/release/tobuild b/resources/scripts/helpers/build/release/tobuild index 7360fb1..ad8bac9 100755 --- a/resources/scripts/helpers/build/release/tobuild +++ b/resources/scripts/helpers/build/release/tobuild @@ -37,7 +37,7 @@ distdir="${versiondir}/${distname}" printf "Creating source archive for flashrom and bucts\n" # delete the old data -rm -Rf "${distdir}/" +rm -Rf "${distdir:?}/" rm -f "${distdir}.tar.xz" # this is where they will go @@ -75,7 +75,7 @@ printf '%s\n' "${version}" >"${distdir}/version" (cd "${versiondir}/" && tar -c "${distname}/" | xz -9e >"${distname}.tar.xz") # and delete the directory -rm -Rf "${distdir}/" +rm -Rf "${distdir:?}/" printf "\n" printf "Tar archive created: %s\n" "${distdir}.tar.xz" diff --git a/resources/scripts/helpers/build/release/util b/resources/scripts/helpers/build/release/util index 5ef733e..95bc234 100755 --- a/resources/scripts/helpers/build/release/util +++ b/resources/scripts/helpers/build/release/util @@ -26,12 +26,12 @@ set -u -e arch="unknown" -if [ $(uname -i) = "i686" ] || [ $(uname -m) = "i686" ] +if [ "$(uname -i)" = "i686" ] || [ "$(uname -m)" = "i686" ] then arch="i686" echo "Running on i686. ok." sleep 2 -elif [ $(uname -i) = "x86_64" ] || [ $(uname -m) = "x86_64" ] +elif [ "$(uname -i)" = "x86_64" ] || [ "$(uname -m)" = "x86_64" ] then arch="x86_64" echo "Running on x86_64. ok." @@ -55,7 +55,7 @@ distdir="${versiondir}/${distname}" printf "Creating utility archive (static executables)\n" # delete the old data -rm -Rf "${distdir}/" +rm -Rf "${distdir:?}/" rm -f "${distdir}.tar.xz" # this is where they will go @@ -221,6 +221,4 @@ printf "done\n\n" # ---------------------------------------------------------------------------------------------------------------------------- # The uncompressed archives are no longer needed -rm -Rf "${distdir}/" - -# ------------------- DONE ---------------------- +rm -Rf "${distdir:?}/" diff --git a/resources/scripts/helpers/build/roms/withgrub b/resources/scripts/helpers/build/roms/withgrub index 5d2f31b..de70b24 100755 --- a/resources/scripts/helpers/build/roms/withgrub +++ b/resources/scripts/helpers/build/roms/withgrub @@ -35,7 +35,7 @@ fi boards="unknown" if [ $# -gt 0 ]; then # build only the ROM images that were requested - boards="$@" + boards="${*}" else # build all ROM images boards="$(for board in resources/libreboot/config/grub/*; do printf "%s\n" "${board##*/}"; done)" @@ -71,7 +71,7 @@ cd ../ for board in ${boards} do if [ -f "resources/libreboot/config/grub/${board}/config" ]; then - ./build roms withgrub_helper ${board} + ./build roms withgrub_helper "${board}" fi done @@ -122,6 +122,3 @@ rm -f "coreboot/grub_txtmode.elf" rm -f coreboot/grub*cfg printf "\n\n" - -# ------------------- DONE ---------------------- - diff --git a/resources/scripts/helpers/build/roms/withgrub_helper b/resources/scripts/helpers/build/roms/withgrub_helper index 15b127a..7dbd9f6 100755 --- a/resources/scripts/helpers/build/roms/withgrub_helper +++ b/resources/scripts/helpers/build/roms/withgrub_helper @@ -32,7 +32,9 @@ if (( $# != 1 )); then exit 1 fi -printf "GRUB Helper script: build ROM images for '%s'\n" "${1}" +boardtarget="${1}" + +printf "GRUB Helper script: build ROM images for '%s'\n" "${boardtarget}" cd "coreboot/" @@ -48,21 +50,21 @@ printf '%s\n' "${version}" >"lbversion" # Build ROM images with text-mode and corebootfb modes. # --------------------------------------------------------------------------------------------------------------- -if [ "${1}" = "qemu_i440fx_piix4" ] || [ "${1}" = "qemu_q35_ich9" ] +if [ "${boardtarget}" = "qemu_i440fx_piix4" ] || [ "${boardtarget}" = "qemu_q35_ich9" ] then # assume that the default config enable framebuffer mode, duplicate and patch for text-mode # necessary, otherwise it will ask you to enter the Y/X resolution of the framebuffer at build time - cp "../resources/libreboot/config/grub/${1}/config" "config_vesafb" + cp "../resources/libreboot/config/grub/${boardtarget}/config" "config_vesafb" sed 's/CONFIG_FRAMEBUFFER_KEEP_VESA_MODE=y/# CONFIG_FRAMEBUFFER_KEEP_VESA_MODE is not set/' < "config_vesafb" > "config_txtmode" else # assume that the default config enables text-mode, duplicate and patch for framebuffer mode - cp "../resources/libreboot/config/grub/${1}/config" "config_txtmode" + cp "../resources/libreboot/config/grub/${boardtarget}/config" "config_txtmode" sed 's/# CONFIG_FRAMEBUFFER_KEEP_VESA_MODE is not set/CONFIG_FRAMEBUFFER_KEEP_VESA_MODE=y/' < "config_txtmode" > "config_vesafb" fi for romtype in txtmode vesafb do - if [ "${1}" = "x200_8mb" ] || [ "${1}" = "x200_4mb" ] || [ "${1}" = "r400_8mb" ] || [ "${1}" = "r400_4mb" ] || [ "${1}" = "t400_8mb" ] || [ "${1}" = "t400_4mb" ] || [ "${1}" = "t500_8mb" ] || [ "${1}" = "t500_4mb" ] + if [ "${boardtarget}" = "x200_8mb" ] || [ "${boardtarget}" = "x200_4mb" ] || [ "${boardtarget}" = "r400_8mb" ] || [ "${boardtarget}" = "r400_4mb" ] || [ "${boardtarget}" = "t400_8mb" ] || [ "${boardtarget}" = "t400_4mb" ] || [ "${boardtarget}" = "t500_8mb" ] || [ "${boardtarget}" = "t500_4mb" ] then if [ "${romtype}" = "txtmode" ] then @@ -76,23 +78,23 @@ do make clean mv "config_${romtype}" ".config" mv "grub_${romtype}.elf" "grub.elf" - make -j$(nproc) + make -j"$(nproc)" mv "grub.elf" "grub_${romtype}.elf" - mv "build/coreboot.rom" "${1}_${romtype}.rom" + mv "build/coreboot.rom" "${boardtarget}_${romtype}.rom" # .config no longer needed rm -f ".config" # Add version information to this image - ./util/cbfstool/cbfstool ${1}_${romtype}.rom add -f lbversion -n lbversion -t raw + ./util/cbfstool/cbfstool "${boardtarget}_${romtype}.rom" add -f lbversion -n lbversion -t raw # Add the background image if [ "$romtype" = "vesafb" ] then if [ "$1" = "macbook21" ] || [ "$1" = "x200_4mb" ] || [ "$1" = "x200_8mb" ] || [ "$1" = "r400_4mb" ] || [ "$1" = "r400_8mb" ] || [ "$1" = "t400_4mb" ] || [ "$1" = "t400_8mb" ] || [ "$1" = "t500_4mb" ] || [ "$1" = "t500_8mb" ] then - ./util/cbfstool/cbfstool ${1}_${romtype}.rom add -f ../resources/grub/background/background1280x800.png -n background.png -t raw + ./util/cbfstool/cbfstool "${boardtarget}_${romtype}.rom" add -f ../resources/grub/background/background1280x800.png -n background.png -t raw else - ./util/cbfstool/cbfstool ${1}_${romtype}.rom add -f ../resources/grub/background/background1024x768.png -n background.png -t raw + ./util/cbfstool/cbfstool "${boardtarget}_${romtype}.rom" add -f ../resources/grub/background/background1024x768.png -n background.png -t raw fi fi @@ -100,32 +102,32 @@ do for keymap in $(for keylayout in ../resources/utilities/grub-assemble/keymap/original/*; do printf "%s\n" "${keylayout##*/}"; done) do # copy the images based on the keymap - cp "${1}_${romtype}.rom" "${1}_${keymap}_${romtype}.rom" + cp "${boardtarget}_${romtype}.rom" "${boardtarget}_${keymap}_${romtype}.rom" # Insert grub config into the image - ./util/cbfstool/cbfstool ${1}_${keymap}_${romtype}.rom add -f grub_${keymap}_${romtype}.cfg -n grub.cfg -t raw + ./util/cbfstool/cbfstool "${boardtarget}_${keymap}_${romtype}.rom" add -f "grub_${keymap}_${romtype}.cfg" -n grub.cfg -t raw # Insert grub test config into the image (for the user to test modifications to before modifying the main one) - ./util/cbfstool/cbfstool ${1}_${keymap}_${romtype}.rom add -f grub_${keymap}_${romtype}_test.cfg -n grubtest.cfg -t raw + ./util/cbfstool/cbfstool "${boardtarget}_${keymap}_${romtype}.rom" add -f "grub_${keymap}_${romtype}_test.cfg" -n grubtest.cfg -t raw done # This config-less ROM is no longer needed - rm -f "${1}_${romtype}.rom" + rm -f "${boardtarget}_${romtype}.rom" done # Now we clean up and prepare the bin directory containing all the images # ---------------------------------------------------------------------------------------------------------------------------- # prepare directory for new ROM images -rm -Rf "${1}/" -mkdir "${1}/" +rm -Rf "${boardtarget:?}/" +mkdir "${boardtarget}/" # move the ROM's into the newly created directory -mv "${1}"*.rom "${1}/" +mv "${boardtarget}"*.rom "${boardtarget}/" # delete the old ROM's from ../bin -rm -Rf "../bin/grub/${1}/" +rm -Rf "../bin/grub/${boardtarget}/" # now put the new ROM's in ./bin/grub/ [ ! -d "../bin/grub/" ] && mkdir -p "../bin/grub/" -mv "${1}/" "../bin/grub/" +mv "${boardtarget}/" "../bin/grub/" # libreboot version file no longer needed rm -f "lbversion" @@ -134,4 +136,3 @@ rm -f "lbversion" cd "../" printf "\n\n" - diff --git a/resources/scripts/helpers/download/bucts b/resources/scripts/helpers/download/bucts index ae58b93..6e615d7 100755 --- a/resources/scripts/helpers/download/bucts +++ b/resources/scripts/helpers/download/bucts @@ -57,6 +57,3 @@ git am "../resources/bucts/patch/0001-Makefile-don-t-use-git.patch" cd "../" printf "\n\n" - -# ------------------- DONE ---------------------- - diff --git a/resources/scripts/helpers/download/coreboot b/resources/scripts/helpers/download/coreboot index 337cdad..2a10236 100755 --- a/resources/scripts/helpers/download/coreboot +++ b/resources/scripts/helpers/download/coreboot @@ -152,6 +152,3 @@ printf "Deblobbing coreboot\n" ./resources/utilities/coreboot-libre/deblob printf "\n\n" - -# ------------------- DONE ---------------------- - diff --git a/resources/scripts/helpers/download/flashrom b/resources/scripts/helpers/download/flashrom index bbe844b..edf363a 100755 --- a/resources/scripts/helpers/download/flashrom +++ b/resources/scripts/helpers/download/flashrom @@ -62,6 +62,3 @@ patch "flashchips.c" < "../resources/flashrom/patch/purged_chips.diff" cd "../" printf "\n\n" - -# ------------------- DONE ---------------------- - diff --git a/resources/scripts/helpers/download/grub b/resources/scripts/helpers/download/grub index c10ad43..229b8ce 100755 --- a/resources/scripts/helpers/download/grub +++ b/resources/scripts/helpers/download/grub @@ -50,6 +50,3 @@ git am "../resources/grub/patch/0001-grub-core-normal-main.c-Display-FREE-AS-IN- cd "../" printf "\n\n" - -# ------------------- DONE ---------------------- - diff --git a/resources/scripts/helpers/download/memtest86plus b/resources/scripts/helpers/download/memtest86plus index 950607c..88ba855 100755 --- a/resources/scripts/helpers/download/memtest86plus +++ b/resources/scripts/helpers/download/memtest86plus @@ -78,6 +78,3 @@ cp "../resources/memtest86plus/patch/Makefile" . cd "../" printf "\n\n" - -# ------------------- DONE ---------------------- - diff --git a/resources/scripts/misc/powertop.trisquel7 b/resources/scripts/misc/powertop.trisquel7 index 25bb597..215ae03 100755 --- a/resources/scripts/misc/powertop.trisquel7 +++ b/resources/scripts/misc/powertop.trisquel7 @@ -48,4 +48,3 @@ update-rc.d powertop defaults # Run powertop now and tell the user powertop --auto-tune printf "Done. Run 'powertop --auto-tune' now. This will also run automatically at boot time. Run it again at any time, if needed. This has also been done for you just now.\n" - -- cgit v0.9.1