Copy podcasts back after speeding up

Script for moving processed podcasts back to player:

#!/bin/bash
for f in result/*; do
    base=`basename "$f"`
    if [ -L "original/$base" ]; then
        orig=`readlink -f "original/$base"`
        echo "Moving $base"
        mv "$f" "$orig"
        rm "original/$base"
    else
        echo -e "\E[33mSkipping $base, no original file or not a symlink\E[0m"
    fi
done

UPD: Added checking for existance of original file and it's a symlink. Added progress display.

blog comments powered by Disqus