summaryrefslogtreecommitdiff
path: root/emerald-themes/themes/import.sh
blob: 452404abdc251c550c484f39dfa2bbee79577c40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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