aboutsummaryrefslogtreecommitdiff
path: root/scripts/update-developer-layout.sh
blob: ad58957c3c092f7d85ed6abab12b22a01a2448da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh

# this script updates all code from subversion in the standard developer's layout.
# <hans@at.or.at>

# Usage: just run it and it should find things if you have your stuff layed
# out in the standard dev layout, or used checkout-developer-layout.sh to
# checkout your pd source tree

cd "$(echo $0 | sed 's|\(.*\)/.*$|\1|')/.."
svn_root_dir=`pwd`

SVNOPTIONS="--ignore-externals"

cd $svn_root_dir
echo "Running svn update in $svn_root_dir:"
svn update ${SVNOPTIONS}
echo "Running svn update for svn-externals individually:"
for subsection in $svn_root_dir/externals/*; do
    test -d $subsection || continue
    echo "Subsection: $subsection"
    cd "$subsection"
    svn update ${SVNOPTIONS}
done

cd "$svn_root_dir"
echo "Running svn update for other sections:"
for section in abstractions doc externals packages pd scripts; do
    echo "Section: $svn_root_dir/$section"
    cd "$svn_root_dir/$section"
         svn update ${SVNOPTIONS}
         cd ..
done

if [ -e $svn_root_dir/pd/.git ]; then
	echo "cd $svn_root_dir/pd && git pull origin master"
    cd $svn_root_dir/pd && git pull origin master
else
	echo "no git found at $svn_root_dir/pd/.git"
fi