Minor usage rewording.
[git-scripts.git] / git-svn-create-dirs
blob48bfb50d2378ab640101e54ed9dc20f35d700bac
1 #!/bin/bash
3 # Look for the Git root directory
4 ROOT=`pwd`
5 while [ ! "$ROOT" = "" -a ! -d $ROOT/.git ]; do
6 cd ..
7 ROOT=`pwd`
8 done
10 if [ ! -f .git/config ]; then
11 echo Must be run inside a Git repository
12 fi;
14 FS=" ="
15 svnrepo=`git svn info | grep URL | cut -f2 -d' '`
16 echo Looking for empty directories from $svnrepo
18 FILE=/tmp/files-$$
20 svn list -R $svnrepo > $FILE
22 while read entry
24 if [ "${entry: -1:1}" == "/" ]; then
25 if [ ! -d "$entry" ]; then
26 echo create $entry
27 mkdir -p $entry
30 done < $FILE
32 rm -f $FILE