#! /bin/bash
# digit's debianbaseddistro-uzblinstaller-made-better, aka ddumb ( " d'dumb " )
# GNU GPL
# ddumb (c) Digit
# version 0.01

#warning! (to be removed once tested)
clear
echo "warning this software is untested. you've got it freshly hacked outta the box, raw and untried.  ... and it's gonna ask for root priveledges to install stuff..."
sleep 2 && echo "so back out while you can. (Ctrl+C to cancel) ..." && sleep 1 && echo -n " 5 " && sleep 1 && echo -n " 4 " && sleep 1 && echo -n " 3 " && sleep 1 && echo -n " 2 " && sleep 1 && echo -n " 1 " && sleep 1 && echo -n " 0 " && sleep 1 && echo -n " ok, you asked for it buddy... or maybe you didnt, and you just werent paying attention, either way... we're off! "
#^change once u know it works.

clear
echo "ddumb" && sleep 1 && echo "digit's debianbaseddistro-uzblinstaller-made-better, aka ddumb ( \" d'dumb \" )"
echo "ddumb will now attempt to install the dependancies for uzbl"
sudo apt-get install libwebkit #1.1.15 or higher
sudo apt-get install libsoup #2.24 or higher (dep for webkit/gtk+)
sudo apt-get install gtk #2.14 or higher
sudo apt-get install socat #(for socket communication) [*]
sudo apt-get install dmenu #(vertical patch recommended) [*]
sudo apt-get install zenity #[*]
sudo apt-get install bash #[*]
sudo apt-get install python #[*]
sudo apt-get install xclip #[*]
sudo apt-get install pango #[*]
sudo apt-get install pygtk #[*]
sudo apt-get install pygobject #[*]
# [*]=optional
clear
echo "all your dependancies should now be installed."
sleep 1
echo "where do you think is a sensible place to install uzbl? (e.g. \"/where/i/install/software/from/git\" or merely \"~/\")
type desired location:"
read -p WHARTAEINSTALLUZBLTAE
cd $WHARTAEINSTALLUZBLTAE
clear
echo "uzbl! 'ey!  :)"
git clone git://github.com/Dieterbe/uzbl.git
cd uzbl
echo "do you want the experimental branch? [recommended]
y/n ?
:"
read -p
[ "$REPLY" == "y" ] && git checkout origin/experimental
make
sudo make install
clear
echo "well if all that happened without hitch, you should now have uzbl core, browser and tabbed installed."
echo "which would you like to launch just now?"
sleep 1
echo "

1 uzbl-core
2 uzbl-browser
3 uzbl-tabbed
4 all (to see)
5 none, kthnxbai"
read -p
[ "$REPLY" == "1" ] && clear && uzbl-core
[ "$REPLY" == "2" ] && clear && uzbl-browser
[ "$REPLY" == "3" ] && clear && uzbl-tabbed
[ "$REPLY" == "4" ] && clear && uzbl-core & uzbl-browser & uzbl-tabbed
[ "$REPLY" == "5" ] && clear && echo "ddumb uzbl installer done.  uzbl-core, uzbl-browser & uzbl-tabbed should be installed and ready for use.  for more information, refer to the website: http://www.uzbl.org"

# development extension proposal:
# offer customisation presets n stuff after installation
# such as:
# setup configuration locations
# install adblock, etc
# reconfigure controls to be like a, b or c, or firefox, etc
# user-styles
# add toggle on/off for plugins
# plugin manager.