# Filters out the entire list of paths # provided by bd-sync into a neat list # of unique directories. (much easier # to review) # # Author: http://the-brown-dragon.com/ ####################################### # Remove any comments in input list /^#/d # Remove destination path (same as src) s/^\(....*\*\)..*$/\1/ # File? Then find containing directory /^f/s,\(.*\)/[^/]*$,\1, # Cleanup markers (file/directory and src/dest) s/..//;s/\*$// # Don't bother with the details under .git repositories s,.git/.*,.git, # Filter for unique paths G;s/$/\n/ /^\([^\n]*\)\n.*\1\n/!{ s/\n.*// H } # Display all filtered paths $!d g s/\n//