From: Andrey Miroshnikov Date: Thu, 7 Oct 2021 12:37:20 +0000 (+0100) Subject: coriolis2-chroot: Added optional argument for specifying chroot name X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bfc0e8a1e39a230ec0204e1d19c04a31657a6488;p=dev-env-setup.git coriolis2-chroot: Added optional argument for specifying chroot name --- diff --git a/coriolis2-chroot b/coriolis2-chroot index af658d4..1ba4e35 100755 --- a/coriolis2-chroot +++ b/coriolis2-chroot @@ -10,6 +10,14 @@ NC='\033[0m' # Default name for the new chroot chroot_name="coriolis" +# Check if default chroot name should be used or not +if [ -z $1 ]; then + echo "Not provided a chroot name, using default chroot \"$chroot_name\"" +else + chroot_name="$1" + echo "Using specified chroot name \"$chroot_name\"" +fi + if [ -e /opt/chroot/$chroot_name ]; then echo -e " ${RED}Chroot \"$chroot_name\" exists! Delete with \"rm-deb-chroot\" or