Added files to git repo
This commit is contained in:
		
							
								
								
									
										62
									
								
								menu.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										62
									
								
								menu.sh
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,62 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
set -euo pipefail
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
BASEDIR="$(dirname "${0}" | sed "s|^\.|${PWD}|")"
 | 
			
		||||
OPTION='start'
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
while [[ ! "${OPTION}" == 'Exit' ]]; do
 | 
			
		||||
    printf '\033[?47h\033[2J\033[H'
 | 
			
		||||
 | 
			
		||||
    cat << EOF
 | 
			
		||||
#######################################
 | 
			
		||||
##                                   ##
 | 
			
		||||
##  $(cat "${BASEDIR}/title") Script  ##
 | 
			
		||||
##                                   ##
 | 
			
		||||
##   Jean  <jean@easthighnerd.net>   ##
 | 
			
		||||
##                                   ##
 | 
			
		||||
#######################################
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#################
 | 
			
		||||
##             ##
 | 
			
		||||
##  Main Menu  ##
 | 
			
		||||
##             ##
 | 
			
		||||
#################
 | 
			
		||||
 | 
			
		||||
EOF
 | 
			
		||||
    select OPTION in 'List' 'Configure' 'Partition' 'Install' 'WiFi Setup' 'Post Install' 'Finalize' 'Exit'
 | 
			
		||||
    do
 | 
			
		||||
      case "${OPTION}" in
 | 
			
		||||
        'List'|'Configure'|'Partition'|'Install'|'WiFi Setup'|'Post Install'|'Finalize'|'Exit')
 | 
			
		||||
          break
 | 
			
		||||
          ;;
 | 
			
		||||
        *)
 | 
			
		||||
          printf 'Invalid option\n'
 | 
			
		||||
          ;;
 | 
			
		||||
      esac
 | 
			
		||||
    done
 | 
			
		||||
 | 
			
		||||
    printf '\033[2J\033[H'
 | 
			
		||||
 | 
			
		||||
  if [[ "${OPTION}" == 'List' ]]; then
 | 
			
		||||
    "${BASEDIR}/list.sh"
 | 
			
		||||
  elif [[ "${OPTION}" == 'Configure' ]]; then
 | 
			
		||||
    "${BASEDIR}/configure.sh"
 | 
			
		||||
  elif [[ "${OPTION}" == 'Partition' ]]; then
 | 
			
		||||
    "${BASEDIR}/partition.sh"
 | 
			
		||||
  elif [[ "${OPTION}" == 'Install' ]]; then
 | 
			
		||||
    "${BASEDIR}/install.sh"
 | 
			
		||||
  elif [[ "${OPTION}" == 'WiFi Setup' ]]; then
 | 
			
		||||
    "${BASEDIR}/wifi.sh"
 | 
			
		||||
  elif [[ "${OPTION}" == 'Post Install' ]]; then
 | 
			
		||||
    "${BASEDIR}/post-inst.sh"
 | 
			
		||||
  elif [[ "${OPTION}" == 'Finalize' ]]; then
 | 
			
		||||
    "${BASEDIR}/finalize.sh"
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  printf '\033[?47h\033[2J\033[H'
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
printf '\033[?47l'
 | 
			
		||||
		Reference in New Issue
	
	Block a user