mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-02 01:18:08 +01:00
By wrapping $(cat) in an eval, redirections and other advanced syntax can now work in the early prompts. Also, since "set -E" is broken is the early bash, fall back to using "set -e" and an EXIT trap, until we can upgrade to a bash version that already has working "set -E", or perhaps backport it to 2.05b.
11 lines
360 B
Bash
11 lines
360 B
Bash
#!/bin/sh
|
|
|
|
# SPDX-FileCopyrightText: 2024 Gábor Stefanik <netrolller.3d@gmail.com>
|
|
#
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
if bash --version | grep -q 'GPLv3'; then
|
|
env - PATH=${PREFIX}/bin PS1="\w # " openvt -- bash -i
|
|
else
|
|
bash -c 'while true; do printf "[early Bash - use Ctrl+D] $(pwd) # "; eval "$(cat /dev/tty2)"; done' &> /dev/tty2 &
|
|
fi
|