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