1fc49e5ace80371951960c9bd669f9d1dce07930
[core.git] / setup-repos.sh
1 #!/bin/sh
2 # A little helper script of mine to setup a new development check-out directory
3
4 if test "$1" == ""; then
5         echo "Usage: $0 <repos> Setup given repository locally."
6         exit
7 fi
8
9 echo "$0: Checking out $1 ..."
10 svn co svn+ssh://www.mxchange.org/var/www/svn-repos/$1/ || exit 255
11 cd $1
12 echo "$0: Creating base directories ..."
13 svn mkdir branches tags trunk || exit 255
14 cd trunk
15 echo "$0: Updating skeleton ..."
16 svn up ../../skel/ || exit 255
17 echo "$0: Importing skeleton repository ..."
18 svn export --force ../../skel/trunk/ . || exit 255
19 sh `which svn-add-all.sh`
20 echo "$0: Adding directory application/$1 ..."
21 svn mkdir application/$1 || exit 255
22 echo "$0: Linking to external 'core' repository ..."
23 svn propset svn:externals -F ../../core/trunk/svn-externals.txt . || exit 255
24 cd .. # root
25 echo "$0: Running commit ..."
26 svn commit -m "Initial import with linked core from skeleton" || exit 255
27 echo "$0: Updating ..."
28 svn up
29 echo "$0: Exporting repositiory ..."
30 svn export --force trunk/ /var/www/htdocs/$1
31 cd .. # start
32 echo "$0: All done."