/[pcsx2_0.9.7]/auto_update_from_upstream.sh
ViewVC logotype

Contents of /auto_update_from_upstream.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 94 - (show annotations) (download) (as text)
Thu Sep 9 16:57:05 2010 UTC (10 years, 2 months ago) by william
File MIME type: application/x-sh
File size: 3667 byte(s)
Moved all Auto script definitions into auto_defs.sh.
Updated all auto scripts to call . ./auto_defs.sh
1 #!/bin/bash
2
3
4 . ./auto_defs.sh
5
6 export OVERRIDE_UPDATE_NEEDED_CHECK="0"
7
8
9 if [ "$1" == "--force-update" ] ; then
10 OVERRIDE_UPDATE_NEEDED_CHECK="1"
11 fi
12
13 echo
14 echo "UPSTREAM TRUNK: $upstream_trunk"
15 echo "DOWNSTREAM EXPORT LOCATION: $downstream_export_location"
16
17 cd "$upstream_trunk/trunk"
18
19
20 if [ "$upstream_revision" == "HEAD" ] ; then
21 svn update > /dev/null
22 echo
23 echo -n "Updated Upstream PCSX2 Repository to Revision: "
24 svn log -r head:prev --xml | grep "revision=" | sed s/".*revision=\""// | sed s/"\".*"// > "$upstream_trunk/trunk/upstream_repository_revision.txt"
25 export upstream_revision=`cat "$upstream_trunk/trunk/upstream_repository_revision.txt"`
26 echo $upstream_revision
27 upstream_repository_url=`svn info --xml | grep "<url>" | sed s/"^<url>"// | sed s/"<\/url>$"//`
28 echo "$upstream_repository_url" > "$upstream_trunk/trunk/upstream_repository_url.txt"
29 else
30 svn update -r "$upstream_revision" > /dev/null
31 echo
32 echo -n "Updated Upstream PCSX2 Repository to Revision: "
33 svn log -r "$upstream_revision" --xml | grep "revision=" | sed s/".*revision=\""// | sed s/"\".*"// > "$upstream_trunk/trunk/upstream_repository_revision.txt"
34 export upstream_revision=`cat "$upstream_trunk/trunk/upstream_repository_revision.txt"`
35 echo $upstream_revision
36 upstream_repository_url=`svn info --xml | grep "<url>" | sed s/"^<url>"// | sed s/"<\/url>$"//`
37 echo "$upstream_repository_url" > "$upstream_trunk/trunk/upstream_repository_url.txt"
38 fi
39
40
41 #UPDATE PCSX2 VERSION
42 PCSX2_VERSION="pcsx2-$upstream_current_version_branch-r$upstream_revision-$downstream_build_configuration"
43
44 export current_downstream_revision=`cat "$downstream_export_location/trunk/upstream_repository_revision.txt"`
45
46 if [ "$OVERRIDE_UPDATE_NEEDED_CHECK" != "1" ] ; then
47 if [ "$current_downstream_revision" == "$upstream_revision" ] ; then
48 echo "UPSTREAM REVISION: $upstream_revision"
49 echo "DOWNSTREAM REVISION: $current_downstream_revision"
50 echo
51 echo -e "\\tThere is no need to update the local repository. reason: upstream repository has not been updated."
52 echo
53 echo -e "\\tAborting update of $downstream_export_location/trunk"
54 echo
55 exit 0
56 fi
57 else
58 if [ "$current_downstream_revision" == "$upstream_revision" ] ; then
59 echo "UPSTREAM REVISION: $upstream_revision"
60 echo "DOWNSTREAM REVISION: $current_downstream_revision"
61 echo
62 echo -e "\\tThere is no need to update the local repository. reason: upstream repository has not been updated."
63 echo
64 echo -e "\\tDetected the use of: --force-update ... forcing update ..."
65 fi
66
67 fi
68
69
70
71
72 echo
73 echo -n "CLEANING DOWNSTREAM EXPORT LOCATION: $downstream_export_location/trunk ... "
74 cd "$downstream_export_location/trunk"
75 #rm -Rfv * >/dev/null 2>/dev/null && echo "Done." || echo "Failed."
76 find -not -path "*.svn*" -exec rm -f {} 2>/dev/null \;
77 echo "Done."
78
79
80 #copy current_revision_tag
81 cp -f "$upstream_trunk/trunk/upstream_repository_revision.txt" "$downstream_export_location/trunk/upstream_repository_revision.txt" > /dev/null 2>/dev/null
82 cp -f "$upstream_trunk/trunk/upstream_repository_url.txt" "$downstream_export_location/trunk/upstream_repository_url.txt" > /dev/null 2>/dev/null
83
84
85 mkdir -p "$downstream_export_location/trunk/bin"
86 echo "$PCSX2_VERSION" > "$downstream_export_location/trunk/bin/pcsx2-version.txt"
87
88
89 echo
90 echo "CREATING DOWNSTREAM TRUNK FOR VERSION: $PCSX2_VERSION"
91
92 echo
93 echo -n "EXPORTING: $upstream_trunk/trunk to $downstream_export_location/trunk ... "
94 svn export --force "$upstream_trunk" "$downstream_export_location" 2>/dev/null
95
96
97 "$downstream_export_location/auto_import_3rdparty_deps.sh"
98 #"$downstream_export_location/auto_import_patches.sh"
99 "$downstream_export_location/auto_commit_trunk.sh"

  ViewVC Help
Powered by ViewVC 1.1.22