dchr-bs: various bugfixes
This commit is contained in:
parent
65a931da5f
commit
cb250e4feb
1 changed files with 8 additions and 2 deletions
10
bootstrap.sh
Normal file → Executable file
10
bootstrap.sh
Normal file → Executable file
|
@ -26,7 +26,9 @@ bs_archlinux () {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo '-- Extracting'
|
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'
|
echo '-- Removing rootfs archive'
|
||||||
rm ./rootfs.tar.gz
|
rm ./rootfs.tar.gz
|
||||||
|
|
||||||
|
@ -36,10 +38,14 @@ bs_archlinux () {
|
||||||
cp /etc/hosts "$2/etc/hosts"
|
cp /etc/hosts "$2/etc/hosts"
|
||||||
cp /etc/resolv.conf "$2/etc/resolv.conf"
|
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:'
|
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
|
# some day i will rewrite this script and it will do it automatically
|
||||||
echo '# pacman-key --init'
|
echo '# pacman-key --init'
|
||||||
echo '# pacman-key --populate archlinux'
|
echo '# pacman-key --populate archlinux'
|
||||||
echo '# pacman -Syu'
|
echo '# pacman -Syu'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[[ "$1" != "archlinux" || "$1" == "--help" || "$1" == "" || "$2" == "" || "$3" == "" ]] && help && exit 0
|
||||||
|
|
||||||
|
bs_archlinux "$2" $(readlink -f "$3")
|
||||||
|
|
Loading…
Reference in a new issue