Updated copyright:
[core.git] / contrib / commit-rest.sh
1 #!/bin/sh
2
3 if test "$1" = ""; then
4         echo "Usage: $0 \"<commit-comment>\" [file/directory]"
5         exit 1
6 fi
7
8 echo "$0: Reading projects..."
9 if test "$2" = ""; then
10         LIST=`svn status */ | grep "  " | grep -v "X  " | cut -d " " -f 8 | cut -d "/" -f 1 | sort --unique`
11 else
12         LIST=`svn status */*/"$2" | grep "/" | grep -v "X " | cut -d " " -f 8 | cut -d "/" -f 1-2 | sort --unique`
13 fi
14
15 for repos in ${LIST}; do
16         echo "$0: Committing in ${repos} ..."
17         cd "${repos}" || exit 255
18         svn commit -m "$1" "$2"
19         cd -
20 done
21
22 exit 0