diff options
author | Michal Vasilek <michal@vasilek.cz> | 2022-07-24 10:51:03 +0200 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2022-11-08 22:10:36 +0100 |
commit | 68301a30c1703b12f3294120910c8d4734d29bc6 (patch) | |
tree | 1e91fbd18ec748e4e06ad02acbe6d4f2bc890f24 /xchroot | |
parent | 0abe6c2d8109b1c1f590ee5dd2f340d59cbdd240 (diff) | |
download | xtools-68301a30c1703b12f3294120910c8d4734d29bc6.tar.gz xtools-68301a30c1703b12f3294120910c8d4734d29bc6.tar.xz xtools-68301a30c1703b12f3294120910c8d4734d29bc6.zip |
xchroot: do not require absolute path
Diffstat (limited to 'xchroot')
-rwxr-xr-x | xchroot | 5 |
1 files changed, 1 insertions, 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' |