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])
- # Distro Sourceforge - https://sourceforge.net/projects/tuxhatlinux/
- # 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
- #
- ##########################################################################################
- # Top program dir is used for testing
- # Global Stuff
- UPDATEPACMAN="pacman -Syy"
- STEAM="pacman -S steam ttf-liberation"
- MULTILIB="nano /etc/pacman.conf"
- STH="setup-tuxhat"
- TITLENAME="Tux Hat Linux Steam Client Setup"
- DIALOGRC=${DIALOGRC}
- DISTNAME='Tux Hat Linux '
- DISTVER='v3.4'
- DASH='-'
- SCRIPTNAME='Steam Setup Script'
- MNT=/mnt
- CONFIGFILE=/home/gary/Test/setup-tuxhat.conf
- if [[ -f $CONFIGFILE ]]; then
- source $CONFIGFILE
- else
- echo "Error missing file: setup-tuxhat.conf - Required by program"
- 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 $tmpfile" 0 1 2 5 15
- ###############
- # Steam-Setup #
- ###############
- steamsetupmenuchoices()
- {
- case $choice in
- "1")
- $MULTILIB
- steamsetupmenu
- ;;
- "2")
- $UPDATEPACMAN
- steamsetupmenu
- ;;
- "3")
- $STEAM
- setuptuxhatmenu
- ;;
- esac
- }
- steamsetupmenu() # Steam Client Main Menu Setup
- {
- while :
- do
- DIALOGRC="$DIALOGRC" $DIALOG --backtitle "$DISTNAME$DISTVER $DASH $SCRIPTNAME " --no-shadow \
- --ok-label 'Select' --cancel-label 'Exit' \
- --title "$TITLENAME" --menu "Select Task 1-3 to Setup Steam Client" 10 52 26 \
- "1." "Uncomment Multilib if it's not configured" \
- "2." "Update Pacman to refresh" \
- "3." "Install Steam 32Bit only, needs multilib" 2> $tmpfile
- mmretval=$?
- choice=`cat $tmpfile`
- case $mmretval in
- 0)
- steamsetupmenuchoices
- ;;
- 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
- #
- ########################################################################
- steamsetupmenu
Advertisement
Add Comment
Please, Sign In to add comment