39 lines
1.1 KiB
Bash
39 lines
1.1 KiB
Bash
|
#!/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
|