aboutsummaryrefslogtreecommitdiff
path: root/scripts/auto-build/extra-svn-update-cygwin.sh
blob: 922c154b552ad22bca5380d7f3675cc92a8ddd6e (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
#!/bin/sh
#
# MinGW MSYS does not have its own svn. When using cygwin's svn in
# MSYS, there are sometimes weird issues caused by their different
# types of paths.  This script runs the svn update under cygwin to
# make sure everything runs OK.  The main build script runs this stuff
# under MSYS.

# the source dir where this script is
## this could be done more easily with ${0%/*}
SCRIPT_DIR=$(echo $0 | sed 's|\(.*\)/.*$|\1|')
. $SCRIPT_DIR/auto-build-common

LOGFILE=/tmp/extra-svn-update-cygwin.sh.txt

# convert into absolute path
cd "${SCRIPT_DIR}/../.."
auto_build_root_dir=`pwd`
echo "build root: $auto_build_root_dir" > $LOGFILE 2>&1

echo "--- use SCM to clean and update ------------------------" >> $LOGFILE 2>&1
# first pass at the root without externals
svn up --ignore-externals $auto_build_root_dir >> $LOGFILE 2>&1
# then each folder in the root, but not the root itself, in case pd/
# is coming from a git repo rather than svn. clean_and_update_folder
# will remove pd/ if its not in svn.
for dir in $auto_build_root_dir/*; do
    clean_and_update_folder $dir >> $LOGFILE 2>&1
    remove_dead_svn_externals $dir >> $LOGFILE 2>&1
done