bin: little script corrections
This commit is contained in:
parent
93628b4a86
commit
7a4eba60cd
|
@ -2,6 +2,7 @@ $XDG_CONFIG_HOME/yadm
|
|||
$XDG_CONFIG_HOME/doom
|
||||
$XDG_CONFIG_HOME/git
|
||||
$XDG_CONFIG_HOME/nvim
|
||||
$XDG_CONFIG_HOME/espanso
|
||||
$XDG_CONFIG_HOME/zsh/completion
|
||||
$CONFIG_SHELLS
|
||||
$HOME/.local/bin/scripts
|
||||
|
|
|
@ -18,4 +18,4 @@ ${run:-sudo --preserve-env=BORG_REPO BORG_PASSPHRASE="$($BORG_PASSCOMMAND)" borg
|
|||
$(echo $DIRS_IGNORE_SAFE -x 'software-challenge/**/build' -x state/emacs -x state/go -x .local/lib -x .cpan -x *cache |
|
||||
sed 's|-x \([^ ]\+\)|-e sh:**/\1|g') \
|
||||
"$name" $(test $# -eq 0 && echo etc home root || test $# -eq 1 && echo $1) "${@:2}" 2>&1
|
||||
sudo chown -R $USER:$USER "$BORG_REPO"
|
||||
test -n "$run" || sudo chown -R $USER:$USER "$BORG_REPO"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh -e
|
||||
#!/bin/sh
|
||||
# [M]edia [P]lay
|
||||
# Play given files on mpd, playing external files through symlinking and recursively resolving playlists
|
||||
# depends: xargs realpath mpc
|
||||
|
@ -11,7 +11,8 @@ then shift
|
|||
test "$1" = "-v" && verbose=-v && set -x && shift
|
||||
# TODO this is sooo slow...
|
||||
for arg
|
||||
do filepath="$({ find "$(dirname -- "$arg")" -maxdepth 1 -name "$(basename -- "$arg")*" -exec realpath {} + ||
|
||||
do
|
||||
filepath="$({ find "$(dirname -- "$arg")" -maxdepth 1 -name "$(basename -- "$arg")*" -exec realpath {} + ||
|
||||
find "$MUSIC/$(dirname -- "$arg")" "$MUSIC/Playlists/$(dirname -- "$arg")" -maxdepth 1 \
|
||||
-name "$(basename -- "$arg")*" -exec realpath {} +; } 2>/dev/null)"
|
||||
test -n "$verbose" && echo "Scanning path '$filepath' $(
|
||||
|
|
Loading…
Reference in New Issue