2011年11月4日 星期五

[Ubuntu] Install command (Lazy)


#!/bin/bash

#

#**************************************************************************

#*                                                                        *

#*  atp-get install.sh                                                    *

#*  12 November, 2011                                                     *

#*                                                                        *

#*  created by: Freeman                                                   *

#*                                                                        *

#*  Shows a menu with numeric options to choose a system                  *

#*  The current options are 1, 2, and 3 etc.  Any other option will display   *

#*  an error message and then print a new menu.                           *

#*  Use a Ctrl-C to exit the shell script and get back to a command       *

#*  prompt.                                                               *

#*                                                                        *

#**************************************************************************



while [ 1 ]

do

    clear  # clear the screen



    # display the menu

    echo " "

    echo " "

    echo "     ***************************************************************"

    echo "     **                                                           **"

    echo "     **              Enter the number of the system               **"

    echo "     **                                                           **"

    echo "     **              1 - Install Wine version 1.3                 **"

    echo "     **              2 - Install cangjie.                         **"

    echo "     **              3 - Install tftp.                            **"

    echo "     **              4 - Install kate.                            **"

    echo "     **              5 - Install Texmaker.                        **"

    echo "     **              6 - Install CVS-front                        **"

    echo "     **              7 - Install vim                              **"

    echo "     **              8 - Install minicom                          **"

    echo "     **              9 - Install skype                            **"

    echo "     **              10 - Install xdotool                          **"

    echo "     ***************************************************************"

    echo " "

    echo " "



    read input                  # read character input



    case $input in

    1)

          sudo add-apt-repository ppa:ubuntu-wine/ppa

          sudo apt-get update

          sudo apt-get install wine1.3 ;;

    2)

          sudo apt-get install ibus-table-cangjie;;   

    3)

          sudo apt-get install tftp tftpd openbsd-inetd;;

    4)

          sudo apt-get install kate;;

    5)

          sudo apt-get install texmaker;;

    6)

          sudo apt-get install cervisia;;

    7)

          sudo apt-get install vim;;

    8)

          sudo apt-get install minicom;;

    9)

        echo "Install skype "

        echo "Catch deb from Internet"

    10)

          sudo apt-get install xdotool;;

    *) clear

        echo " "

        echo " "

        echo "I didn't understand that input."

        sleep 5;;           # leave the message on the screen for 5 seconds

    esac



    $0                          # issue this command again



done















 

0 意見:

張貼留言