From fe39c718b7f23d47fef10224a6bdbf9098e7527f Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Tue, 16 Oct 2007 10:21:12 +0000 Subject: add script to import theme images --- import-images.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 import-images.sh (limited to 'import-images.sh') diff --git a/import-images.sh b/import-images.sh new file mode 100755 index 0000000..2d8f06c --- /dev/null +++ b/import-images.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +mode=$1 +shift +theme=$1 +shift + +if [ -z "$mode" -o -z "$theme" ]; then + echo "usage: $0 [bootsplash|background] [files ...]" +fi + +prefix=background/$theme +[ "$mode" = "bootsplash" ] && prefix=bootsplash/data/bootsplash + +for f in "$@"; do + r=`identify -format '%wx%h' $f` + d=$theme/$prefix-$r.png + cp -af $f $d +done -- cgit v1.2.1 From 79ff19f8115ddeb3d2ee1dcf71c5bcd6c54ccb19 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Tue, 16 Oct 2007 14:18:09 +0000 Subject: handle spaces in filenames --- import-images.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'import-images.sh') diff --git a/import-images.sh b/import-images.sh index 2d8f06c..e5be16d 100755 --- a/import-images.sh +++ b/import-images.sh @@ -13,7 +13,7 @@ prefix=background/$theme [ "$mode" = "bootsplash" ] && prefix=bootsplash/data/bootsplash for f in "$@"; do - r=`identify -format '%wx%h' $f` + r=`identify -format '%wx%h' "$f"` d=$theme/$prefix-$r.png - cp -af $f $d + cp -af "$f" "$d" done -- cgit v1.2.1