Add support for giving path to list

This commit is contained in:
Fierelier 2024-02-15 16:15:24 +01:00
parent 0e531d8724
commit 74992d736a
2 changed files with 3 additions and 3 deletions

View File

@ -1,13 +1,13 @@
#!/usr/bin/env bash
cat << EOF
Commands:
* mountman list
* mountman list [/path]
List known block devices.
* mountman plist [/path]
List known block device(s), with technical information, parseable with bash.
* mountman mount
* mountman mount </path>
Mount block device, returns the mountpoint's path.
* mountman umount </path>

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
set +e
bash "$APP_DIR/cmd/main" plist | while read mm_cmd; do
bash "$APP_DIR/cmd/main" plist "$2" | while read mm_cmd; do
eval "$mm_cmd"
if ! [ "$mm_format" = "" ]; then
echo "[$mm_label] $mm_size - $mm_path ($mm_type/$mm_format)"