aps/altools/chroot-al
2021-10-06 20:09:46 +02:00

12 lines
No EOL
340 B
Bash

#!/bin/sh
mount -t proc /proc $1/proc
mount -t sysfs /sys $1/sys
mount -o bind /dev $1/dev
mount -o bind /run $1/run
mount -o bind /sys/firmware/efi/efivars $1/sys/firmware/efi/efivars
cp /etc/resolv.conf $1/etc/resolv.conf
export MAKEFLAGS="-j$(nproc)"
export CFLAGS="-O2 -pipe -march-native"
export CXXFALGS="${CFLAGS}"
chroot $1 /bin/sh