dchr-bs: various bugfixes

This commit is contained in:
DarkCat09 2024-04-09 13:44:57 +04:00
parent 65a931da5f
commit cb250e4feb
Signed by: DarkCat09
GPG key ID: 0A26CD5B3345D6E3

10
bootstrap.sh Normal file → Executable file
View file

@ -26,7 +26,9 @@ bs_archlinux () {
fi
echo '-- Extracting'
tar xzf ./rootfs.tar.gz "root.x86_64/*" -C "$2" || exit 3
tar xzf ./rootfs.tar.gz -C "$2/" || exit 3
mv "$2/root.$1"/* "$2" || exit 4
rmdir "$2/root.$1"
echo '-- Removing rootfs archive'
rm ./rootfs.tar.gz
@ -36,10 +38,14 @@ bs_archlinux () {
cp /etc/hosts "$2/etc/hosts"
cp /etc/resolv.conf "$2/etc/resolv.conf"
echo '-- \e[1;32mOK\e[0m -- archlinux bootstrapped'
echo -e '-- \e[1;32mOK\e[0m -- archlinux bootstrapped'
echo '-- Use dchr-run to enter the chroot and execute the following commands:'
# some day i will rewrite this script and it will do it automatically
echo '# pacman-key --init'
echo '# pacman-key --populate archlinux'
echo '# pacman -Syu'
}
[[ "$1" != "archlinux" || "$1" == "--help" || "$1" == "" || "$2" == "" || "$3" == "" ]] && help && exit 0
bs_archlinux "$2" $(readlink -f "$3")