![Obrazek](http://img145.imageshack.us/img145/701/yab.th.png)
Kod: Zaznacz cały
#!/bin/bash
echo ""
echo " Adesklets + yab Auto-Installer ver. 0.1"
echo -e " ----------------------------------------\n"
echo -e " Install, download and configure all important files:\n"
echo -e " - Adesklets (Install)\n - Microsoft TrueType core fonts (Install)\n - Yab (Download)\n"
echo -e " |<-Return||Next->| use key [<-' Enter] .\n"
wybor="start"
until [[ $wybor = q ]]; do
echo " [ <-' Enter ]"
read wybor
clear
echo " |#| M E N U"
echo " -----------"
echo " |1| Install \"Adesklets\""
echo " |2| Download \"Yab\""
echo " |3| Automatic configuration \"Yab\""
echo -e " |4| Start \"Yab\"\n"
echo -e " |Q| Exit\n"
wheree=`pwd`
case "$wybor" in
"1")
sudo aptitude install adesklets msttcorefonts -y;;
"2")
if [ ! -d ~/.desklets ]; then
mkdir ~/.desklets && wget -c -N -P ~/.desklets http://prdownloads.sourceforge.net/adesklets/yab-0.0.2.tar.bz2?download
cd ~/.desklets
tar xjf yab-0.0.2.tar.bz2 && rm yab-0.0.2.tar.bz2 && mv yab-0.0.2 yab
cd $wheree
echo "Succes! ;)"
elif [ -d ~/.desklets ] && [ ! -d ~/.desklets/yab ]; then
wget -c -N -P ~/.desklets http://prdownloads.sourceforge.net/adesklets/yab-0.0.2.tar.bz2?download
cd ~/.desklets
tar xjf yab-0.0.2.tar.bz2 && rm yab-0.0.2.tar.bz2 && mv yab-0.0.2 yab
echo "Succes! ;)"
cd $wheree
else
echo -e "Directory \"yab\" already exist! Please go to the point 3.\n"
fi;;
"3")
if [ -d ~/.desklets/yab ]; then
rm -r ~/.desklets/yab/icons
cp -r icons ~/.desklets/yab && cp configure/config.txt ~/.desklets/yab
cd ~/.desklets/yab
echo "Pleas choose \"r\" register desklet yab."
./yab.py
cd $wheree
cat .autostart.txt > ~/.config/autostart/adesklets.desktop
cat .activator.txt > ~/Pulpit/Yab.desktop
echo ""
echo " Succes! ;)"
else
echo -e "Directory does not exist- error! Please back to the point 2 or manually configuration.\n"
fi;;
"4")
adesklets
sleep 2
adesklets --nautilus;;
"q" | "Q") exit;;
"*");;
esac
done