Fix for spaces in folder name (also tested with "./ ", just in case)

This commit is contained in:
DarkCat09 2024-04-09 11:06:50 +04:00
parent bf1fb52247
commit cc5b00f0d0
Signed by: DarkCat09
GPG key ID: 0A26CD5B3345D6E3

6
run.sh
View file

@ -38,10 +38,10 @@ main () {
exit 0
fi
chrdir="$(readlink -f "$1")"
chrdir=$(readlink -f "$1")
chrcmd="${2:-/bin/bash}"
trap "clean $chrdir" EXIT
trap "clean \"$chrdir\"" EXIT
setup "$chrdir"
runcmd "$chrdir" "$chrcmd"
@ -54,4 +54,4 @@ sourced () {
return 1
}
sourced || main $@
sourced || main "$@"