Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash -x
- #----------------------------------------------------------------------------------------
- # Script Created by Gary Perreault - Tux Hat Linux Project ([email protected])
- # IRC Freenode #bsdgeekclub @UNIXwz0r @Vincent0ne-
- # Distro Sourceforge - https://sourceforge.net/projects/tuxhatlinux/
- # Distro Youtube - https://www.youtube.com/channel/UCDXUtAdTuZSRDFgBHC2gaGA
- # Distro Pastebin - http://pastebin.com/u/unixwz0r
- # Distro Deviantart -http://ipodpunker.deviantart.com/
- # Distro Dailymotion - http://www.dailymotion.com/tuxhatlinux
- #----------------------------------------------------------------------------------------
- #This program is free software: you can redistribute it and/or modify
- #it under the terms of the GNU General Public License as published by
- #the Free Software Foundation, either version 3 of the License, or
- #(at your option) any later version.
- #
- #This program is distributed in the hope that it will be useful,
- #but WITHOUT ANY WARRANTY; without even the implied warranty of
- #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- #GNU General Public License for more details.
- #
- #You should have received a copy of the GNU General Public License
- #along with this program. If not, see <http://www.gnu.org/licenses/>.
- #----------------------------------------------------------------------------------------
- # Run this script after your first boot with archlinux (as root)
- #----------------------------------------------------------------------------------------
- # Explaination of the Script:
- #
- # Setup-Tuxhat using Dialog. The main menu script has like 8 seperate setup scripts.
- #
- # Scripts are listed in # Scripts below
- ##########################################################################################
- # Top program dir is used for testing
- # Global Stuff
- TITLENAME="Tux Hat Linux Main Setup"
- DIALOGRC=${DIALOGRC}
- DISTNAME='Tux Hat Linux '
- DISTVER='v3.4'
- DASH='-'
- SCRIPTNAME='Main Menu Setup'
- MNT=/mnt
- CONFIGFILE=/home/gary/Test/setup-tuxhat.conf
- # Scripts
- SCRIPT1="/home/gary/Test/arch-setup"
- SCRIPT2="/home/gary/Test/tuxhat-setup"
- SCRIPT3="/home/gary/Test/network-setup"
- SCRIPT4="/home/gary/Test/vbox-guest-setup"
- SCRIPT5="/home/gary/Test/video-setup"
- SCRIPT6="/home/gary/Test/compton-setup"
- SCRIPT7="/home/gary/Test/steam-setup"
- SCRIPT8="/home/gary/Test/local-setp"
- if [[ -f $CONFIGFILE ]]; then
- source $CONFIGFILE
- else
- echo "Error missing file: setup-tuxhat.conf - Required by program"
- exit 1
- source $SCRIPT1
- fi
- # Linux name and version is set in its own config file.
- #VERSIONINFO=$PROGDIR/etc/distver.conf
- #
- #if [[ -f $VERSIONINFO ]]; then
- # source $VERSIONINFO
- #else
- # echo "Error missing file: distver.conf - Required by program"
- # echo "Installer's Directory is $PROGDIR/etc"
- # exit 1
- #fi
- ### Program for making the UI
- DIALOG=${DIALOG=dialog}
- #DIALOG=${DIALOG=Xdialog}
- # Temp files
- tmpfile=`tmpfile 2> /dev/null` || tmpfile=/tmp/tmpfile$$
- trap "rm -f $tempfile" 0 1 2 5 15
- ####################
- # Main Menu Config #
- ####################
- setuptuxhatmenuchoices() {
- case $choice in
- "Arch Linux Based Setup")
- $SCRIPT1
- ;;
- "Tux Hat Linux Setup")
- $SCRIPT2
- ;;
- "Network Setup (DHCP)")
- $SCRIPT3
- ;;
- "Virtualbox Guest Setup")
- $SCRIPT4
- ;;
- "Video Setup")
- $SCRIPT5
- ;;
- "Compton Composite Setup")
- $SCRIPT6
- ;;
- "Steam Client Setup")
- $SCRIPT7
- ;;
- "Copy ISO to HDD without network")
- $SCRIPT8
- ;;
- esac
- }
- {
- while :
- do
- DIALOGRC="$DIALOGRC" $DIALOG --backtitle "$DISTNAME$DISTVER $DASH $SCRIPTNAME " --no-shadow \
- --ok-label 'Select' --cancel-label 'Exit' \
- --title "$FUNCTION" --menu "Select Setup Script" 15 46 16 \
- "Arch Linux Based Setup" "[Root]" \
- "Tux Hat Linux Setup" "[Root]" \
- "Network Setup (DHCP)" "[Root]" \
- "Virtualbox Guest Setup" "[Root]" \
- "Video Setup" "[User]" \
- "Compton Composite Setup" "[Root]" \
- "Steam Client Setup" "[Root]" \
- "Copy ISO to HDD without network" "[Root]" 2> $tmpfile
- mmretval=$?
- choice=`cat $tmpfile`
- case $mmretval in
- 0)
- setuptuxhatmenuchoices
- ;;
- 1)
- if DIALOGRC="$DIALOGRC" $DIALOG --yesno "Do you want to exit?\n" 5 24
- then
- exit 0
- fi
- ;;
- 255)
- # echo "ESC key pressed"
- ;;
- esac
- done
- }
- ########################################################################
- #
- # End of Script -- Tux Hat Linux Development -- UNIXwz0r
- #
- ########################################################################
Advertisement
Add Comment
Please, Sign In to add comment