Last active
December 11, 2015 14:39
-
-
Save nodakai/4615753 to your computer and use it in GitHub Desktop.
Enumerates prop key-value pairs for each managed objects in a SVN repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
function objloop() { | |
local fp=$1 pn | |
echo -n "$fp: " | |
for pn in `svn plist "$fp" | tail -n +2 | sort`; do | |
echo -n $pn=\"`svn pget "$pn" "$fp"`\" ' ' | |
done | |
echo | |
} | |
function dirloop() { | |
local dir=$1 fn | |
for fn in `svn ls "$dir" | sort`; do | |
fp="$dir$fn" | |
if [ -f "$fp" ]; then | |
objloop "$fp" | |
elif [ -d "$fp" ]; then | |
objloop "$fp" | |
dirloop "$fp" | |
fi | |
done | |
} | |
iniobj="${1:-.}" | |
if [ -f "$iniobj" ]; then | |
objloop "$iniobj" | |
elif [ -d "$iniobj" ]; then | |
dirloop "$iniobj"/ | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment