diff --git a/bin/fflow b/bin/fflow index 2519fd9..af770cd 100755 --- a/bin/fflow +++ b/bin/fflow @@ -1,21 +1,20 @@ #!/usr/bin/env zsh -# requires: ffmpeg +setopt extendedglob # written by Steve Kinney (2018), licensed under CC BY-SA 4.0 -# audio -> 16/48K +# audio -> 16/48K (lowers audio quality to 16/48k) +# improvements made by fm'latghor / Leo Coogan IMG_FILES="^*.png ^*.PNG ^*.jpg ^*.JPG ^*.bmp ^*.BMP ^*.gif ^*.GIF ^*.tiff ^*.TIFF" for f in *.flac; do -echo "Processing $f" -ffmpeg -y -i "$f" -sample_fmt s16 -ar 48000 "${f%.flac}-16.flac" + echo "Processing $f" + ffmpeg -y -i "$f" -sample_fmt s16 -ar 48000 "${f%.flac}-16.flac" done -while true; do - read -p "Delete original files? " yn - case $yn in - [Yy]* ) rm -- ^*-16.flac $IMG_FILES; exit;; - [Nn]* ) exit;; - * ) printf "Please answer yes or no. ";; - esac -done +if read -q "REPLY?Delete original files? "; then + exec 2>/dev/null + rm -- ^*-16.flac $IMG_FILES; exit +else + printf "\nABORTING...\n" +fi diff --git a/bin/remove_old_kernels b/bin/rm_old_kernels similarity index 100% rename from bin/remove_old_kernels rename to bin/rm_old_kernels