From 707f5f6f5f02ab832f440bfed9c1d670df14e34f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wo=C5=BAniak?= Date: Fri, 28 Aug 2020 20:39:19 +0200 Subject: [PATCH] Added gentoo-test Signed-off-by: Marcin Wozniak --- .local/bin/gentoo-test | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 .local/bin/gentoo-test diff --git a/.local/bin/gentoo-test b/.local/bin/gentoo-test new file mode 100755 index 0000000..674f112 --- /dev/null +++ b/.local/bin/gentoo-test @@ -0,0 +1,28 @@ +#!/bin/bash + +sudo mount /dev/disk/by-uuid/c61f258f-5fd1-47f2-a270-bb8aa63b0020 /mnt/gentoo + +sleep 5 +sync + +if [ -e /dev/disk/by-uuid/c61f258f-5fd1-47f2-a270-bb8aa63b0020 ] +then + sudo mkdir -p /mnt/gentoo/proc + sudo mkdir -p /mnt/gentoo/dev + sudo mkdir -p /mnt/gentoo/sys + sudo mkdir -p /mnt/gentoo/mnt/backup/ccache + sudo cp -r /mnt/backup/ccache/ccache.conf /mnt/gentoo/mnt/backup/ccache + sudo rsync -az -H /etc/portage/ /mnt/gentoo/gentoo/etc/portage/ + sudo rsync -az -H /usr/portage/ /mnt/gentoo/gentoo/usr/portage/ + sudo rsync -az -H /usr/repos/ /mnt/gentoo/gentoo/usr/repos/ + sudo mount --types proc /proc /mnt/gentoo/gentoo/proc + sudo mount --rbind /sys /mnt/gentoo/gentoo/sys + sudo mount --make-rslave /mnt/gentoo/gentoo/sys + sudo mount --rbind /dev /mnt/gentoo/gentoo/dev + sudo mount --make-rslave /mnt/gentoo/gentoo/dev + sleep 5 + sudo chroot /mnt/gentoo/gentoo /bin/bash + # echo "Europe/Warsaw" > /etc/timezone + # emerge --config sys-libs/timezone-data + # emerge dev-util/ccache app-shells/oh-my-zsh app-admin/sudo app-editors/vim +fi