JeremyStarTM
3f0f0e0113
CHANGES - [androot.sh] Improve code quality - [androot.sh] Modify DOWNLOADSERVER* variables - [patch.sh] Implement rootfs patching - [prepare.sh] Squashed bugs - [rootfsbuilder/archlinux-x86_64.sh] Remove "copy pacman config" flag causing some issues - [systeminstall.sh] Implement rootfs configuration and update script BUGS - [systeminstall.sh|patch.sh] Scripts only work on the same architecture as the host
38 lines
1.1 KiB
Bash
Executable file
38 lines
1.1 KiB
Bash
Executable file
#!/bin/bash
|
|
# disable errors regarding androot.source as
|
|
# it is created and loaded at runtime
|
|
# shellcheck disable=SC1091
|
|
|
|
source "${TMPDIR}/androot.source"
|
|
source "${TMPDIR}/androot.env"
|
|
log_diag "patch is now executing, with arguments \"${*}\""
|
|
|
|
case "${ARCH_TARGET}" in
|
|
"x86_64") ;;
|
|
"arm64") ;;
|
|
"powerpc64") ;;
|
|
"mips64") ;;
|
|
*)
|
|
log_error "Internal inconsistency detected: Invalid target architecture \"${ARCH_TARGET}\""
|
|
exit 1
|
|
;;
|
|
esac
|
|
indicate_exec "Patching rootfs"
|
|
case "${DISTRIBUTION}" in
|
|
"archlinux")
|
|
if ! log_execute wget "${DOWNLOADSERVER}/patches/archlinux/fakeroot-tcp-${ARCH_TARGET}.pkg.tar.zst" --no-verbose -O "${LOCATION}/mountdir/fakeroot-tcp-${ARCH_TARGET}.pkg.tar.zst"; then
|
|
indicate_fail;
|
|
exit 1
|
|
fi
|
|
if ! chroot_env "${LOCATION}/mountdir" "pacman -U --noconfirm /fakeroot-tcp-${ARCH_TARGET}.pkg.tar.zst"; then
|
|
indicate_fail
|
|
exit 1
|
|
fi
|
|
;;
|
|
*)
|
|
indicate_fail
|
|
log_error "Internal inconsistency detected: Invalid distribution \"${DISTRIBUTION}\""
|
|
exit 1
|
|
;;
|
|
esac
|
|
indicate_ok
|