more functions fixing

This commit is contained in:
Tobias Powalowski 2022-03-22 08:21:36 +01:00
parent 3d491ec3bc
commit bbd7756966
2 changed files with 17 additions and 2 deletions

View file

@ -26,6 +26,21 @@ printk()
esac
}
# geteditor()
# prompts the user to choose an editor
# sets EDITOR global variable
geteditor() {
if ! [[ "${EDITOR}" ]]; then
DIALOG --menu "Select a Text Editor to Use" 10 35 3 \
"1" "nano (easier)" \
"2" "vi" 2>${ANSWER} || return 1
case $(cat ${ANSWER}) in
"1") EDITOR="nano" ;;
"2") EDITOR="vi" ;;
esac
fi
}
getdest() {
[[ "${DESTDIR}" ]] && return 0
DIALOG --inputbox "Enter the destination directory where your target system is mounted" 8 65 "${DESTDIR}" 2>${ANSWER} || return 1

View file

@ -11,12 +11,13 @@ if [[ "${RUNNING_ARCH}" == "aarch64" ]]; then
VMLINUZ="Image.gz"
VMLINUZ_EFISTUB="Image"
fi
# name of the initramfs filesystem
INITRAMFS="initramfs-${KERNELPKG}"
# abstract the common pacman args
PACMAN="pacman --root ${DESTDIR} ${PACMAN_CONF} --cachedir=${DESTDIR}/var/cache/pacman/pkg --noconfirm --noprogressbar"
# chroot_mount()
# prepares target system as a chroot
#
chroot_mount()
{
if grep -qw archboot /etc/hostname; then
@ -33,7 +34,6 @@ chroot_mount()
# chroot_umount()
# tears down chroot in target system
#
chroot_umount()
{
if grep -qw archboot /etc/hostname; then