mirror of
https://gitlab.com/prism7/archery.git
synced 2025-02-15 08:29:17 +01:00
Change: Color functions have been edited, now being more concise
Change: 'Machine Detection' function (machine_dtct) has been wrapped in an 'until' loop (now needed)
This commit is contained in:
parent
b942e7653a
commit
ebd533e7cc
1 changed files with 20 additions and 50 deletions
70
Amelia.sh
70
Amelia.sh
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# Amelia Installer
|
# Amelia Installer
|
||||||
# https://gitlab.com/prism7/archery
|
# https://gitlab.com/prism7/archery
|
||||||
# Version: 8.6.0
|
# Version: 8.6.1
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
|
@ -23,51 +23,21 @@
|
||||||
red="\e[31m"
|
red="\e[31m"
|
||||||
nc="\e[0m"
|
nc="\e[0m"
|
||||||
|
|
||||||
MAGENTABG() {
|
MAGENTABG() { echo -e "${magentabg} $1${nc}" ;}
|
||||||
echo -e "${magentabg} $1${nc}"
|
YELLOWBG() { echo -e "${yellowbg} $1${nc}" ;}
|
||||||
}
|
YELLOWL() { echo -e "${yellowl} $1${nc}" ;}
|
||||||
YELLOWBG() {
|
GREENBG() { echo -e "${greenbg} $1${nc}" ;}
|
||||||
echo -e "${yellowbg} $1${nc}"
|
MAGENTA() { echo -e "${magenta} $1${nc}" ;}
|
||||||
}
|
YELLOW() { echo -e "${yellow} $1${nc}" ;}
|
||||||
YELLOWL() {
|
BLUEBG() { echo -e "${bluebg} $1${nc}" ;}
|
||||||
echo -e "${yellowl} $1${nc}"
|
CYANBG() { echo -e "${cyanbg} $1${nc}" ;}
|
||||||
}
|
WHITEB() { echo -e "${bwhite} $1${nc}" ;}
|
||||||
GREENBG() {
|
GREEN() { echo -e "${green} $1${nc}" ;}
|
||||||
echo -e "${greenbg} $1${nc}"
|
REDBG() { echo -e "${redbg} $1${nc}" ;}
|
||||||
}
|
BLUE() { echo -e "${blue} $1${nc}" ;}
|
||||||
MAGENTA() {
|
CYAN() { echo -e "${cyan} $1${nc}" ;}
|
||||||
echo -e "${magenta} $1${nc}"
|
RED() { echo -e "${red} $1${nc}" ;}
|
||||||
}
|
NC() { echo -e "${nc} $1${nc}" ;}
|
||||||
YELLOW() {
|
|
||||||
echo -e "${yellow} $1${nc}"
|
|
||||||
}
|
|
||||||
BLUEBG() {
|
|
||||||
echo -e "${bluebg} $1${nc}"
|
|
||||||
}
|
|
||||||
CYANBG() {
|
|
||||||
echo -e "${cyanbg} $1${nc}"
|
|
||||||
}
|
|
||||||
WHITEB() {
|
|
||||||
echo -e "${bwhite} $1${nc}"
|
|
||||||
}
|
|
||||||
GREEN() {
|
|
||||||
echo -e "${green} $1${nc}"
|
|
||||||
}
|
|
||||||
REDBG() {
|
|
||||||
echo -e "${redbg} $1${nc}"
|
|
||||||
}
|
|
||||||
BLUE() {
|
|
||||||
echo -e "${blue} $1${nc}"
|
|
||||||
}
|
|
||||||
CYAN() {
|
|
||||||
echo -e "${cyan} $1${nc}"
|
|
||||||
}
|
|
||||||
RED() {
|
|
||||||
echo -e "${red} $1${nc}"
|
|
||||||
}
|
|
||||||
NC() {
|
|
||||||
echo -e "${nc} $1${nc}"
|
|
||||||
}
|
|
||||||
# END COLOR FUNCTIONS
|
# END COLOR FUNCTIONS
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
# PROMPT FUNCTIONS
|
# PROMPT FUNCTIONS
|
||||||
|
@ -504,8 +474,8 @@ machine_dtct() {
|
||||||
${magenta}###${nc}------------------------------------${magenta}[ ${bwhite}Machine Detection${nc} ${magenta}]${nc}------------------------------------${magenta}###
|
${magenta}###${nc}------------------------------------${magenta}[ ${bwhite}Machine Detection${nc} ${magenta}]${nc}------------------------------------${magenta}###
|
||||||
"
|
"
|
||||||
CPU="$(grep -E 'vendor_id' /proc/cpuinfo)"
|
CPU="$(grep -E 'vendor_id' /proc/cpuinfo)"
|
||||||
hardw_model="$(hostnamectl | grep -E 'Hardware Model:'|sed 's| Hardware Model: ||')"
|
hardw_model="$(hostnamectl | grep -E 'Hardware Model:'| sed 's| Hardware Model: ||')"
|
||||||
hardw_model_vend="$(hostnamectl | grep -E 'Hardware Model:'|sed 's| Hardware Model: ||' | awk "{print \$1}")"
|
hardw_model_vend="$(hostnamectl | grep -E 'Hardware Model:'| sed 's| Hardware Model: ||' | awk "{print \$1}")"
|
||||||
hardw_vendor="$(hostnamectl | grep -E 'Hardware Vendor' | awk "{print \$3}")"
|
hardw_vendor="$(hostnamectl | grep -E 'Hardware Vendor' | awk "{print \$3}")"
|
||||||
machine="$(hostnamectl | grep -E 'Chassis' | awk "{print \$2}")"
|
machine="$(hostnamectl | grep -E 'Chassis' | awk "{print \$2}")"
|
||||||
|
|
||||||
|
@ -561,7 +531,7 @@ Enter [Y/n]: "
|
||||||
sleep 0.2
|
sleep 0.2
|
||||||
YELLOW "
|
YELLOW "
|
||||||
|
|
||||||
### Watchdogs have been disabled
|
### Watchdogs will be disabled
|
||||||
"
|
"
|
||||||
elif [[ "${kill_watchdog}" == "n" ]]; then
|
elif [[ "${kill_watchdog}" == "n" ]]; then
|
||||||
skip
|
skip
|
||||||
|
@ -6468,5 +6438,5 @@ OPTIMIZED
|
||||||
uefi_check
|
uefi_check
|
||||||
connection_check
|
connection_check
|
||||||
upd_clock
|
upd_clock
|
||||||
machine_dtct
|
until machine_dtct; do : ; done
|
||||||
until main_menu; do : ; done
|
until main_menu; do : ; done
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue