normal
This commit is contained in:
parent
39e1a9b927
commit
cf876c72d8
12 changed files with 64 additions and 68 deletions
37
build.sh
37
build.sh
|
@ -57,26 +57,13 @@ rm --force --recursive \
|
|||
mkdir --parents "${MEMDISK_DIRECTORY}"
|
||||
|
||||
echo -n "\
|
||||
function var_search {
|
||||
search \\
|
||||
--set data \\
|
||||
function set_init {
|
||||
search --no-floppy --set data \\
|
||||
--fs-uuid '${DATA}'
|
||||
#
|
||||
search \\
|
||||
--set esp \\
|
||||
search --no-floppy --set esp \\
|
||||
--fs-uuid '${ESP}'
|
||||
}
|
||||
|
||||
function var_set {
|
||||
check_signatures='no'
|
||||
pager=1
|
||||
#
|
||||
var_search
|
||||
if [ \"\${esp}\" ] ; then
|
||||
#
|
||||
prefix=\"(\${esp})/grub\"
|
||||
root=\"\${esp}\"
|
||||
#
|
||||
env=\"(\${esp})/grub.env\"
|
||||
live=\"(\${esp})/${PROJECT}/live\"
|
||||
#
|
||||
|
@ -84,13 +71,23 @@ function var_set {
|
|||
source \"\${file}\"
|
||||
done
|
||||
unset file
|
||||
#
|
||||
env_init
|
||||
normal \"\${live}/main.sh\"
|
||||
fi
|
||||
}
|
||||
|
||||
var_set
|
||||
function normal_init {
|
||||
check_signatures='no'
|
||||
pager=1
|
||||
#
|
||||
set_init
|
||||
if [ \"\${esp}\" ] ; then
|
||||
prefix=\"(\${esp})/grub\"
|
||||
root=\"\${esp}\"
|
||||
#
|
||||
normal \"\${live}/normal.sh\"
|
||||
fi
|
||||
}
|
||||
|
||||
normal_init
|
||||
" > "${MEMDISK_FILE}"
|
||||
# gpg --detach-sign "${MEMDISK_FILE}"
|
||||
|
||||
|
|
11
live/main.sh
11
live/main.sh
|
@ -1,11 +0,0 @@
|
|||
menuentry 'scan →' { menu 'scan' }
|
||||
menuentry 'var →' { menu 'var' }
|
||||
menu_split
|
||||
menuentry 'data / boot / bash / latest / gui' { debsquash '/boot/bash/latest/gui' }
|
||||
menuentry 'data / boot / bash / latest / tui' { debsquash '/boot/bash/latest/tui' }
|
||||
menuentry 'data / boot / bash / stable / gui' { debsquash '/boot/bash/stable/gui' }
|
||||
menuentry 'data / boot / bash / stable / tui' { debsquash '/boot/bash/stable/tui' }
|
||||
menu_split
|
||||
menuentry "cmd → ${cmdpath} → ${grub_cpu}-${grub_platform}" { menu 'cmd' }
|
||||
menuentry "env → ${env} → ${env_mod}" { menu 'env' }
|
||||
menuentry 'gfx → ?' { menu 'gfx' }
|
|
@ -1,11 +1,8 @@
|
|||
env_init
|
||||
menu_init
|
||||
|
||||
menuentry 'halt' { halt }
|
||||
|
||||
menuentry 'reboot' { reboot }
|
||||
|
||||
menuentry 'reload' { menu }
|
||||
|
||||
menuentry 'exit normal' { normal_exit }
|
||||
|
||||
menuentry 'exit grub' { exit }
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
menu_init
|
||||
env_init
|
||||
menu_init "${env} → ${env_mod}"
|
||||
|
||||
menuentry 'list file' {
|
||||
env_list
|
||||
pause
|
||||
}
|
||||
|
||||
menuentry 'list variables' {
|
||||
set
|
||||
pause
|
||||
}
|
||||
|
||||
menuentry 'reset defaults' {
|
||||
env_set
|
||||
env save
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
env_init
|
||||
menu_init
|
||||
|
||||
menuentry 'list' {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
env_init
|
||||
menu_init "${scan}"
|
||||
|
||||
scan "${scan}"
|
||||
|
|
14
live/menu/set.sh
Normal file
14
live/menu/set.sh
Normal file
|
@ -0,0 +1,14 @@
|
|||
env_init
|
||||
menu_init
|
||||
|
||||
default='split'
|
||||
|
||||
menuentry "cmdpath: ${cmdpath}" { nop }
|
||||
menuentry "grub_cpu: ${grub_cpu} → grub_platform: ${grub_platform}" { nop }
|
||||
menu_split
|
||||
menuentry "check_signatures: ${check_signatures} → pager: ${pager}" { nop }
|
||||
menuentry "prefix: ${prefix} → root: ${root}" { nop }
|
||||
menu_split 'split'
|
||||
menuentry "esp: ${esp} → data: ${data}" { nop }
|
||||
menuentry "env: ${env} → env_mod: ${env_mod}" { nop }
|
||||
menuentry "live: ${live}" { nop }
|
|
@ -1,12 +0,0 @@
|
|||
menu_init
|
||||
default='split'
|
||||
menuentry "check_signatures | ${check_signatures}" { nop }
|
||||
menuentry "pager | ${pager}" { nop }
|
||||
menuentry "prefix | ${prefix}" { nop }
|
||||
menuentry "root | ${root}" { nop }
|
||||
menu_split 'split'
|
||||
menuentry "data | ${data}" { nop }
|
||||
menuentry "esp | ${esp}" { nop }
|
||||
menuentry "env | ${env}" { nop }
|
||||
menuentry "env_mod | ${env_mod}" { nop }
|
||||
menuentry "live | ${live}" { nop }
|
15
live/normal.sh
Normal file
15
live/normal.sh
Normal file
|
@ -0,0 +1,15 @@
|
|||
env_init
|
||||
menu_init
|
||||
|
||||
default='scan'
|
||||
|
||||
menuentry ' scan →' --id 'scan' { menu 'scan' }
|
||||
menuentry '↑ gfx →' { menu 'gfx' }
|
||||
menuentry '↑ env →' { menu 'env' }
|
||||
menuentry '↑ set →' { menu 'set' }
|
||||
menuentry '↑ cmd →' { menu 'cmd' }
|
||||
menu_split
|
||||
menuentry 'bash / stable / tui' { debsquash '/boot/bash/stable/tui' }
|
||||
menuentry 'bash / stable / gui' { debsquash '/boot/bash/stable/gui' }
|
||||
menuentry 'bash / latest / tui' { debsquash '/boot/bash/latest/tui' }
|
||||
menuentry 'bash / latest / gui' { debsquash '/boot/bash/latest/gui' }
|
|
@ -22,6 +22,7 @@ function env_apply {
|
|||
}
|
||||
|
||||
function env_init {
|
||||
set_init
|
||||
env_set
|
||||
env_mod
|
||||
env_apply
|
||||
|
@ -34,13 +35,13 @@ function env_list {
|
|||
}
|
||||
|
||||
function env_mod {
|
||||
env_mod='?'
|
||||
env_mod='---'
|
||||
if [ -f "${env}" ] ; then
|
||||
env_mod='-'
|
||||
env_mod='--x'
|
||||
if env 'load' ; then
|
||||
env_mod='r'
|
||||
env_mod='r-x'
|
||||
if env 'save' ; then
|
||||
env_mod='w'
|
||||
env_mod='rwx'
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -16,13 +16,15 @@ function menu_color {
|
|||
}
|
||||
|
||||
function menu_init {
|
||||
if [ "${1}" ] ; then
|
||||
menuentry "→ ${menu} → ${1}" { nop }
|
||||
else
|
||||
menuentry "→ ${menu}" { nop }
|
||||
if [ "${menu}" ] ; then
|
||||
if [ "${1}" ] ; then
|
||||
menuentry "→ ${menu} → ${1}" { nop }
|
||||
else
|
||||
menuentry "→ ${menu}" { nop }
|
||||
fi
|
||||
menu_split
|
||||
default=2
|
||||
fi
|
||||
menu_split
|
||||
default=2
|
||||
}
|
||||
|
||||
function menu_item {
|
||||
|
@ -39,8 +41,6 @@ function menu_item {
|
|||
function menu_load {
|
||||
menu="${1}"
|
||||
export menu
|
||||
# env_export
|
||||
var_export
|
||||
configfile "${live}/menu/${menu}.sh"
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
function var_export {
|
||||
export \
|
||||
data esp \
|
||||
env env_mod \
|
||||
live
|
||||
}
|
Loading…
Reference in a new issue