summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornesl247 <nesl247>2006-12-10 02:11:57 +0000
committernesl247 <nesl247>2006-12-10 02:11:57 +0000
commit8bc25c585363818a3cf2c6a2c352244d0f3df43f (patch)
tree920888571c12bb8ce8777c1698caf080d1238934
parent519d5cf940c6ffed2676bc622f3da142ae668141 (diff)
downloademerald-themes-8bc25c585363818a3cf2c6a2c352244d0f3df43f.tar.gz
emerald-themes-8bc25c585363818a3cf2c6a2c352244d0f3df43f.tar.bz2
Redo import.sh. It's cleaner and should always install as root:root. Basically a fix for gentoo and others who don't build as root, but install as root
-rwxr-xr-xthemes/import.sh25
1 files changed, 8 insertions, 17 deletions
diff --git a/themes/import.sh b/themes/import.sh
index 452404a..cc812bf 100755
--- a/themes/import.sh
+++ b/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