#!/bin/sh
# test we are root
if [ "$(id -u)" != "0" ]; then
   echo "run as root now exitting"
   exit 1
fi

P=Azure
V=20180423
SRC=$P-$V
USER=`cat /etc/sysconfig/tcuser`
LIST="submitqc "
for Z in $LIST 
    do 
    su -c "tce-load -i $Z" $USER
done


D1=https://dl.opendesktop.org/api/files/downloadfile/id/1524096734/s
D2=cc3eb243aefa0d2230e86369e31a73c9/t/1524561448/u/322444
cd /tmp
su -c "/usr/local/bin/wget -nc --no-check-certificate \
$D1/$D2/$P.tar.xz " $USER
xz -d $P*xz && tar xvf $P*tar
mv $P $SRC
mkdir -p $P/usr/local/share/themes
mv $SRC $P/usr/local/share/themes/$P

# main
#####
mkdir -p $P/usr/local/share/doc/$P
echo 'https://github.com/vinceliuice/Azure-theme/blob/master/COPYING  ' > $P/usr/local/share/doc/$P/COPYING

# TCZ them
#######
LIST="$P "
for Z in $LIST
do
	mksquashfs $Z $Z.tcz
	md5sum $Z.tcz > $Z.tcz.md5.txt
	cd $Z
	find usr -not -type d > /tmp/$Z.tcz.list
        sed 's|usr|/usr|g' -i /tmp/$Z.tcz.list
	cd /tmp
done

echo 'gtk3.tcz' > $P.tcz.dep

echo 'Title:          Azure.tcz  
Description:    gtk3 light theme 
Version:        20180423
Author:         horst3180 and Vince Liuice 
Original-site:  https://www.gnome-look.org/content/show.php/Azure?content=168843
Copying-policy: GPL v2
Size:		
Extension_by:   aus9 at gmx dot com
Tags:           xfce gtk3 theme
Comments:       Light gtk3 theme based on Arc
                
                XFCE settings -> Appearance -> Style theme  
                XFCE settings -> Window Manager theme

                May work on other WMs too

                In testing the XFCE window manager...no gremlins
                but in appearance, especially pulldown file in 
                leafpad, your selection may become transparent.

                I will find alternative light theme later.

                Compiled for 64 9.x
Change-log:     2018/04/26  First version 
Current:        2018/04/26 ' > $P.tcz.info

submitqc --libs
