summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2015-02-15 01:02:01 (EST)
committer Francis Rowe <info@gluglug.org.uk>2015-02-15 01:02:01 (EST)
commit3eac903512ef6bad3b9830cc3774aa7cf7fafdc0 (patch)
treeae88b9bf5f872e083fe26e7303e7e24bec77e20c
parent66bfe54de0edbaac83738e71a93b6f7c67fd08af (diff)
downloadlibreboot-3eac903512ef6bad3b9830cc3774aa7cf7fafdc0.zip
libreboot-3eac903512ef6bad3b9830cc3774aa7cf7fafdc0.tar.gz
libreboot-3eac903512ef6bad3b9830cc3774aa7cf7fafdc0.tar.bz2
grub-background: change only one ROM image, specified by path
-rwxr-xr-xgrub-background27
1 files changed, 10 insertions, 17 deletions
diff --git a/grub-background b/grub-background
index 420f34d..6e0bd4f 100755
--- a/grub-background
+++ b/grub-background
@@ -21,16 +21,20 @@
set -u -e -v
-if (( $# != 1 )); then
- echo "Usage: ./grub-background /path/to/image.jpg"
- echo "You need to specify exactly 1 argument"
+if (( $# != 2 )); then
+ echo "Usage: ./grub-background /path/to/libreboot.rom /path/to/image.jpg"
exit 1
fi
-
if [ ! -f $1 ]; then
echo "File not found!"
exit 1
fi
+if [ ! -f $2 ]; then
+ echo "File not found!"
+ exit 1
+fi
+rompath=$1
+jpegpath=$2
path="unknown"
if [ -f "DEBLOB" ]; then
@@ -46,16 +50,5 @@ else
exit 1
fi
-cd bin/
-for board in $(ls)
-do
- cd "$board"/
- for file in $(ls *vesafb*)
- do
- cd ../../
- $path bin/"$board"/"$file" remove -n background.jpg
- $path bin/"$board"/"$file" add -f "$1" -n background.jpg -t raw
- cd bin/"$board"/
- done
- cd ../
-done
+$path "$rompath" remove -n background.jpg
+$path "$rompath" add -f "$jpegpath" -n background.jpg -t raw