wsl: wsl-mount: add usage message

master
Alan Faubert 1 year ago
parent 1082d1fb7b
commit 4d12497a66

@ -1,6 +1,7 @@
#!/bin/bash
[[ $# = 0 || $# -gt 2 ]] && { >&2 echo 'Arguments: [<drive or share>] <directory>'; exit 1; }
[ $UID = 0 ] || { wsl.exe --distribution $WSL_DISTRO_NAME --user $(id --name --user 0) -- ${0@Q} ${@@Q}; exit; }
if [ "$2" ]; then
if [ $# = 2 ]; then
mkdir --parents "$2" &&
mount --types drvfs "$1" "$2" ||
rmdir "$2"

Loading…
Cancel
Save