diff --git a/.local/bin/moul b/.local/bin/moul index 2ab910c..b0dc475 100755 --- a/.local/bin/moul +++ b/.local/bin/moul @@ -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}" diff --git a/.local/bin/mvk b/.local/bin/mvk index 6d3bf73..f04d09e 100755 --- a/.local/bin/mvk +++ b/.local/bin/mvk @@ -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 "$@"