diff --git a/.local/bin/scripts/bag b/.local/bin/scripts/bag index 9849f28..6e20f36 100755 --- a/.local/bin/scripts/bag +++ b/.local/bin/scripts/bag @@ -15,7 +15,7 @@ test $# -gt 0 || cd "$root" name="::$(test -n "$name" && echo "$name" || cat /etc/hostname)_${1:-system}_$(date -u +"%y%m%d")" echo "Backing up as $name" ${run:-sudo --preserve-env=BORG_REPO BORG_PASSPHRASE="$($BORG_PASSCOMMAND)" borg} create --exclude-caches $args \ - $(echo $DIRS_IGNORE_SAFE -x 'software-challenge/**/build' -x state/emacs -x state/go -x .local/lib -x .cpan -x *cache | + $(echo $DIRS_IGNORE_SAFE -x 'software-challenge/**/build' -x state/emacs -x state/go -x .local/lib -x .cpan -x *cache -x $HOME/.gem | sed 's|-x \([^ ]\+\)|-e sh:**/\1|g') \ "$name" $(test $# -eq 0 && echo etc home root || test $# -eq 1 && echo $1) "${@:2}" 2>&1 test -n "$run" || sudo chown -R $USER:$USER "$BORG_REPO" diff --git a/.local/bin/scripts/moul b/.local/bin/scripts/moul index b539e76..cfd76ce 100755 --- a/.local/bin/scripts/moul +++ b/.local/bin/scripts/moul @@ -16,18 +16,19 @@ case $1 in code=$? sudo rm -df "$last" exit $code;; - (*) arg=$1;; + (*) arg=$1 + shift;; esac # FSTAB: BY LABEL if grep --word-regexp "LABEL=$arg" /etc/fstab then # have to mount twice as the first one might be creating the directory - mount -L "$@" 2>/dev/null || mount -L "$@" + mount -L "$arg" "$@" 2>/dev/null || mount -L "$arg" "$@" exit $? fi # FSTAB: BY MOUNTPOINT/NAME if grep --word-regexp "$arg" /etc/fstab -then mount "$@"; exit $? +then mount "$arg" "$@"; exit $? fi # MANUALLY