summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xemerald-themes/themes/import.sh25
1 files changed, 8 insertions, 17 deletions
diff --git a/emerald-themes/themes/import.sh b/emerald-themes/themes/import.sh
index 452404a..cc812bf 100755
--- a/emerald-themes/themes/import.sh
+++ b/emerald-themes/themes/import.sh
@@ -1,21 +1,12 @@
#!/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
+pushd ${1}${2}
+for x in $(ls | grep emerald)
do
- ITheme "$each"
+ emerald=${x/.emerald/}
+ echo ${x}
+ mkdir -p ${emerald}
+ # Unpack to DESTDIR/datadir/emerald/themes
+ tar -xof ${x} -C ${emerald}
+ rm -f ${x}
done
-rm -rf ./scratch
popd