bin: fix moul & mvk

This commit is contained in:
xerus2000 2020-12-27 13:54:06 +01:00
parent de2141177a
commit 765190c8a1
2 changed files with 3 additions and 8 deletions

View File

@ -1,4 +1,3 @@
#!/bin/sh
# Mount a partition by label automatically
sudo mkdir -p "${2:-/mnt/$1}"
sudo mount -L "$1" "${2:-/mnt/$1}"
sudo mount -o rw,X-mount.mkdir -L "$1" "${2:-/mnt/$1}"

View File

@ -1,9 +1,5 @@
#!/bin/sh
# Creates the last arg as directory and moves everything else into it
# Creates the last arg as directory (or its parent if not ending in a slash) and moves everything else into it
for last; do true; done
mkdir -p $(case "$last" in (*/) echo "$last";; (*) dirname "$last";; esac)
mv "$@"
mv -n "$@"