summaryrefslogtreecommitdiff
path: root/emerald-themes/themes/import.sh
diff options
context:
space:
mode:
Diffstat (limited to 'emerald-themes/themes/import.sh')
-rwxr-xr-xemerald-themes/themes/import.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/emerald-themes/themes/import.sh b/emerald-themes/themes/import.sh
new file mode 100755
index 0000000..452404a
--- /dev/null
+++ b/emerald-themes/themes/import.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+ITheme()
+{
+ echo $1
+ NAME="`echo $1 | sed -e 's/.emerald$//'`"
+ if [ -d "$NAME" ]
+ then
+ mv -f -- "$NAME" __OLDTHEME__
+ fi
+ mkdir -p -- "$NAME"
+ tar -xzf "$1" -C "./$NAME"
+ rm -f -- "$1"
+ rm -rf __OLDTHEME__ # workaround weird bugs
+}
+pushd $1$2
+for each in ./*.emerald
+do
+ ITheme "$each"
+done
+rm -rf ./scratch
+popd