From 68301a30c1703b12f3294120910c8d4734d29bc6 Mon Sep 17 00:00:00 2001 From: Michal Vasilek Date: Sun, 24 Jul 2022 10:51:03 +0200 Subject: xchroot: do not require absolute path --- xchroot | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/xchroot b/xchroot index 2c68623..f6d7954 100755 --- a/xchroot +++ b/xchroot @@ -10,10 +10,7 @@ if [ "$(id -u)" -ne 0 ]; then fail 'xchroot needs to run as root' fi -case "$1" in - /*) CHROOT=$1; shift;; - *) fail 'no absolute chroot dir given';; -esac +CHROOT=$1; shift [ -d "$CHROOT" ] || fail 'not a directory' [ -d "$CHROOT/dev" ] || fail 'no /dev in chroot' -- cgit 1.4.1