[ create a new paste ] login | about

Link: http://codepad.org/aCmX49CG    [ raw code | fork ]

Plain Text, pasted on Mar 9:
#!/bin/bash
# if dpkg -l "libssl-dev" &>/dev/null; then echo "YES"; else echo "NO"; fi
# Define some colors first:
red="\033[0;31m"
green="\033[0;32m"
yellow="\033[0;33m"
endcolor="\033[0m"
#
# Manually Install ZNC
function manually_install_znc {
# First we check if ZNC is installed
if [ -d "$home/znccu " ]; then
    echo "ZNC is allredy installed"
    mkdir test
  else 
    echo "ZNC is not installed, installing it!"
    mkdir test
fi
}
#
# This is the menu for option 4
function manually_install_selected_software {
    yourch=
    until [ "$yourch" = "0" ]; do
    clear
	echo -e "  $green ___  ___                        _ _         _           _        _ _            _           _           _              __ _                          $endcolor"
	echo -e "  $green |  \/  |                       | | |       (_)         | |      | | |          | |         | |         | |            / _| |                         $endcolor"
	echo -e "  $green | .  . | __ _ _ __  _   _  __ _| | |_   _   _ _ __  ___| |_ __ _| | |  ___  ___| | ___  ___| |_ ___  __| |  ___  ___ | |_| |___      ____ _ _ __ ___ $endcolor"
	echo -e "  $green | |\/| |/ _\` | '_ \| | | |/ _\` | | | | | | | | '_ \/ __| __/ _\` | | | / __|/ _ \ |/ _ \/ __| __/ _ \/ _\` | / __|/ _ \|  _| __\ \ /\ / / _\` | '__/ _ \ $endcolor"
	echo -e "  $green | |  | | (_| | | | | |_| | (_| | | | |_| | | | | | \__ \ || (_| | | | \__ \  __/ |  __/ (__| ||  __/ (_| | \__ \ (_) | | | |_ \ V  V / (_| | | |  __/$endcolor"
	echo -e "  $green \_|  |_/\__,_|_| |_|\__,_|\__,_|_|_|\__, | |_|_| |_|___/\__\__,_|_|_| |___/\___|_|\___|\___|\__\___|\__,_| |___/\___/|_|  \__| \_/\_/ \__,_|_|  \___|$endcolor"
	echo -e "  $green                                      __/ |                                                                                                           $endcolor"
	echo -e "  $green                                     |___/                                                                                                            $endcolor"	
	echo ""
	echo -e "  $yellow Type the number of your choice$endcolor"
	echo ""
	echo -e "  $yellow Select the software you will install on your system$endcolor"
	echo ""
    echo "   [1] ZNC"
    echo "   [2] InspIRCd"
    echo "   [3] Anope"
    echo "   [4] MainMenu"
    echo "   [5] Exit"
    echo "   ======================="
    echo -n "   Enter your menu choice [1-5]: "
    read yourch
    case $yourch in
      1) manually_install_znc ;;
      2) manually_install_inspircd ;;
      3) manually_instal_anope ;;
      4) start ;;
      5) exit 0 ;;
      *) echo "Opps!!! Please select choice 1,2,3,4, or 5";
         echo "Press a key. . ." ; read ;;
 esac
done               
}
#
# This is the main menu
#
function start {
    yourch=
    until [ "$yourch" = "0" ]; do
    clear
	echo -e "   $green _____        __ _                            _____          _        _ _                    __   _____ $endcolor"
	echo -e "   $green/  ___|      / _| |                          |_   _|        | |      | | |                  /  | |  _  |$endcolor"
	echo -e "   $green\ \`--.  ___ | |_| |___      ____ _ _ __ ___    | | _ __  ___| |_ __ _| | | ___ _ __  __   __\`| | | |/' |$endcolor"
	echo -e "   $green \`--. \/ _ \|  _| __\ \ /\ / / _\` | '__/ _ \   | || '_ \/ __| __/ _\` | | |/ _ \ '__| \ \ / / | | |  /| |$endcolor"
	echo -e "   $green/\__/ / (_) | | | |_ \ V  V / (_| | | |  __/  _| || | | \__ \ || (_| | | |  __/ |     \ V / _| |_\ |_/ /$endcolor"
	echo -e "   $green\____/ \___/|_|  \__| \_/\_/ \__,_|_|  \___|  \___/_| |_|___/\__\__,_|_|_|\___|_|      \_/  \___(_)___/ $endcolor"
	echo ""
	echo -e "  $yellow Type the number of your choice$endcolor"
	echo ""
	echo -e "  $yellow You can ether install the software's one by one or install all in same time$endcolor"
	echo ""
    echo "   [1] Auto Install all software's"
    echo "   [2] Manually install all software's"
    echo "   [3] Auto install selected software"
    echo "   [4] Manually install slected software"
    echo "   [5] Show a list whit software's in this installer"
    echo "   [6] Exit/Stop"
    echo "   ======================="
    echo -n "   Enter your menu choice [1-6]: "
    read yourch
    case $yourch in
      1) install_znc ;;
      2) echo "Files in `pwd`" ; ls -l ; echo "Press a key. . ." ; read ;;
      3) cal ; echo "Press a key. . ." ; read ;;
      4) manually_install_selected_software ;;
      5) echo "" ;
         echo "   This package will install fallowing software's" ; 
         echo "   ================================================" ;
         echo "   1: ZNC" ;
         echo "   2: Anope";
         echo "   3: InspIRCd" ; read ;;
      6) exit 0 ;;
      *) echo "Opps!!! Please select choice 1,2,3,4,5, or 6";
         echo "Press a key. . ." ; read ;;
 esac
done
}
#
# This is here just to start the script
start
#




Create a new paste based on this one


Comments: