bin: various corrections
This commit is contained in:
parent
8af2f94cbe
commit
57ad5f2e1b
|
@ -32,7 +32,7 @@ fileinfo() {
|
|||
$elevate file -E "$arg"
|
||||
#probe="$($elevate ffprobe "$arg" 2>&1)"
|
||||
#echo $probe | grep -v -e '00:00:00.04' -e 'ansi' &&
|
||||
$elevate ffprobe "$arg" 2>&1 | grep "bitrate: ....\? " | sed 's/, start:[^,]\+,/,/' ||
|
||||
$elevate ffprobe -hide_banner "$arg" 2>&1 | grep "bitrate: ....\? " | sed 's/, start:[^,]\+,/,/' ||
|
||||
stat --format "%A %s $(
|
||||
size="$($elevate unzip -l "$arg" 2>/dev/null | tail -1)" &&
|
||||
echo "(uncompressed $(echo $size | cut -d' ' -f1 | numfmt --to=iec-i --suffix=B))"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh -e
|
||||
# Displays the latest files in the given directory or pwd
|
||||
test "$1" = "-a" && all=true && shift
|
||||
for f in "${@:-PWD}"
|
||||
for f in "${@:-$PWD}"
|
||||
do test $# -gt 1 && highlight "$f"
|
||||
find "$f" -maxdepth 4 -type f -printf '%.16T+ %P\n' |
|
||||
sort -r | $(test "$all" && echo "less" || echo "head")
|
||||
|
|
|
@ -13,7 +13,9 @@ then
|
|||
fi
|
||||
|
||||
if grep -e "^LABEL=$arg[^\w/]" /etc/fstab
|
||||
then mount -L "$@"; exit $?
|
||||
then # have to mount twice as the first one might be creating the directory
|
||||
mount -L "$@" 2>/dev/null || mount -L "$@"
|
||||
exit $?
|
||||
fi
|
||||
if grep -e "[^\w=/]$arg[^\w/]" /etc/fstab
|
||||
then mount "$@"; exit $?
|
||||
|
|
|
@ -35,7 +35,7 @@ then shift
|
|||
done
|
||||
else
|
||||
test "$1" = "-q" && quiet=-q && shift
|
||||
test -n "$(mpc playlist)" && next=-q
|
||||
test -n "$(mpc playlist)" -a "$(mpc status | wc -l)" -gt 1 && next=-q
|
||||
test "$1" = "--seek" && seek=-q
|
||||
( "$0" -r "$@" && mpc -q update --wait ) | #tee /tmp/mp 2>&1
|
||||
xargs --delim='\n' mpc insert
|
||||
|
|
Loading…
Reference in New Issue