From: Steven Baltakatei Sandoval Date: Wed, 15 May 2024 23:25:42 +0000 (+0000) Subject: fix(user/bk-copy-rand-music):Follow direct symlinks to files X-Git-Url: https://zdv2.bktei.com/gitweb/BK-2020-03.git/commitdiff_plain/9a6c59b707c794c0c98af2653638d9b4d2a243b4?ds=inline fix(user/bk-copy-rand-music):Follow direct symlinks to files --- diff --git a/user/bk-copy-rand-music b/user/bk-copy-rand-music index 7a7d299..597a663 100755 --- a/user/bk-copy-rand-music +++ b/user/bk-copy-rand-music @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Desc: Copies random audio files # Usage: bk-copy-rand-music [dir SOURCE] [dir DEST] [int DURATION] ([int BYTES]) -# Version: 0.4.0 +# Version: 0.4.1 # Depends: BK-2020-03: bkshuf v0.1.0 declare -Ag appRollCall # Associative array for storing app status @@ -463,7 +463,7 @@ main() { path_candfile="$line"; # path of candidate file ### Check size - siz_cand="$(du -b "$path_candfile" | awk '{ print $1 }')"; # size in bytes + siz_cand="$(du -Lb "$path_candfile" | awk '{ print $1 }')"; # size in bytes if ! checkInt "$siz_cand"; then continue; fi; # reject if [[ "$((siz + siz_cand))" -gt "$siz_dest" ]]; then continue; fi; # reject if [[ "$siz_cand" -lt "$min_file_size" ]]; then continue; fi; # reject