summaryrefslogtreecommitdiffstats
path: root/import-images.sh
diff options
context:
space:
mode:
Diffstat (limited to 'import-images.sh')
-rwxr-xr-ximport-images.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/import-images.sh b/import-images.sh
new file mode 100755
index 0000000..e5be16d
--- /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] <theme name> [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