3 then echo "Please run as root"
6 # Terminal echo colours
10 # Default name for the new chroot
11 chroot_name
="coriolis"
13 if [ -e /opt
/chroot
/$chroot_name ]; then
15 ${RED}Chroot \"$chroot_name\" exists! Delete with \"rm-deb-chroot\" or
16 run parts of this script separately${NC}
18 echo "See https://libre-soc.org/HDL_workflow/coriolis2/ for more info.
23 echo "Creating a new chroot \"$chroot_name\" using \"mk-deb-chroot\""
24 .
/mk-deb-chroot
$chroot_name
25 echo "Copying scripts to chroot \"$chroot_name\" using \"cp-scripts-to-chroot\""
26 .
/cp-scripts-to-chroot
$chroot_name
28 # Run coriolis installation script as a normal user
29 echo "Entering \"$chroot_name\" and setting Coriolis and its dependencies!"
30 runuser
$SUDO_USER -c "schroot -c $chroot_name --directory=/tmp /bin/bash << EOF
31 cd /home/$SUDO_USER/dev-env-setup
36 echo "Your new Coriolis chroot should now be setup and ready to go!"
38 ${RED}To get inside the new chroot, execute the following (as normal user):${NC}"
40 ${RED}schroot -c $chroot_name --directory=/home/$SUDO_USER${NC}