initLoader() should do that
[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 if test "$1" != "admin"; then
21         echo "$0: Adding directory application/$1 ..."
22         svn mkdir application/$1 || exit 255
23 else
24         echo "$0: --- Not creating directory application/$1. ---"
25 fi
26 echo "$0: Linking to external 'core' repository ..."
27 svn propset svn:externals -F ../../core/trunk/svn-externals.txt . || exit 255
28 if test "$1" != "admin"; then
29         cd application/
30         svn propset svn:externals "admin http://www.ship-simu.org/repos/admin/trunk/application/admin/" . || exit 255
31         cd .. # trunk
32 else
33         echo "$0: --- Not setting admin external source. ---"
34 fi
35 cd .. # root
36 echo "$0: Running commit ..."
37 svn commit -m "Initial import with linked core from skeleton" || exit 255
38 echo "$0: Updating ..."
39 svn up
40 echo "$0: Exporting repositiory ..."
41 svn export --force trunk/ /var/www/htdocs/$1
42 cd .. # start
43 echo "$0: All done."