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

Annotation of /auto_build_latest_upstream.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 134 - (hide annotations) (download) (as text)
Fri Sep 10 13:19:26 2010 UTC (9 years, 3 months ago) by william
File MIME type: application/x-sh
File size: 3318 byte(s)
Save Build Path to temporary variable
fix BUILD -> 
    export DISABLE_AUTO_BRANCH="0" (previously not set)
    export DISABLE_PREBUILD="0" (previously not set)
    export DISABLE_CLEANUP="0" (previously not set)
1 william 92 #!/bin/bash
2 william 119 . ./auto_defs.sh
3 william 92
4 william 109
5    
6 william 97 if [ "$1" != "" ] ; then
7     export OVERRIDE_TMP_BUILD_PATH="$1"
8     . ./auto_build_defs.sh
9     fi
10    
11 william 134 export DISABLE_AUTO_BRANCH="0"
12     export DISABLE_PREBUILD="0"
13     export DISABLE_CLEANUP="0"
14 william 100
15 william 105 if [ "$2" == "--no-auto-branch" ] ; then
16     DISABLE_AUTO_BRANCH="1"
17 william 100 fi
18 william 101 if [ "$3" == "--no-prebuild" ] ; then
19     DISABLE_PREBUILD="1"
20     fi
21 william 103 if [ "$4" == "--no-cleanup" ] ; then
22     DISABLE_CLEANUP="1"
23     fi
24 william 100
25 william 92 # output variables
26     echo "---------------------------------------------------------------------------------------"
27     echo "AUTO BUILD CONFIG:"
28     echo
29     echo -e "\\tPCSX2 VCS BUILD PATH: $PCSX2_BUILD_TMP"
30     echo -e "\\tPCSX2 VCS PROJECT FILE: $VSC_PROJECT_FILE"
31 william 116 echo -e "\\tPCSX2 VCS BUILD VERSION: $PCSX2_VERSION"
32 william 92 echo
33 william 119 echo -e "\\tMSBUILD PATH: $VSC_MSBUILD"
34     echo -e "\\tMSBUILD OPTIONS: $VSC_MSBUILD_OPTIONS"
35     echo
36 william 92 echo "---------------------------------------------------------------------------------------"
37    
38     echo
39     echo "PERFORMING AUTOBUILD:"
40    
41 william 95
42    
43 william 96 # call auto prebuild
44 william 101 if [ "$DISABLE_PREBUILD" == "0" ] ; then
45 william 102 if [ "$AUTO_PREBUILD_DONE" == "" ] ; then
46     "$downstream_export_location/auto_prebuild_latest_upstream.sh"
47     if [ "$AUTO_PREBUILD_DONE" != "true" ] ; then
48     echo "PREBUILD FAILED..."
49     exit 1
50     fi
51     fi
52 william 101 else
53 william 119 echo "PREBUILD HAS BEEN DISABLED ... to enable do not use --no-prebuild"
54     cd "$PCSX2_BUILD_TMP"
55     find -name *.pch -exec rm -f {} \;
56     echo
57 william 98 fi
58 william 92
59 william 119 # re-generate pcsx2-version.txt
60     echo "$PCSX2_VERSION" > "$PCSX2_BUILD_TMP/bin/pcsx2-version.txt"
61    
62 william 92 # START VISUAL STUDIO BUILD SUPPORT
63     export BUILD_SUCCESS=0
64     echo "PERFORMING BUILD:"
65 william 121
66     # remove log files
67     rm -f "$downstream_export_location/"$VSC_MSBUILD_LOG_FILE_PREFIX*.log
68 william 119 "$VSC_MSBUILD" $VSC_MSBUILD_OPTIONS "$VSC_PROJECT_PATH_WIN32" && BUILD_SUCCESS=0 || BUILD_SUCCESS=1
69 william 121
70 william 92 # END VISUAL STUDIO BUILD SUPPORT
71    
72     #echo "BUILD SUCCESS: $BUILD_SUCCESS"
73    
74     if [ "$BUILD_SUCCESS" == 0 ] ; then
75     echo "BUILD COMPLETED..."
76     echo
77    
78     # START POST BUILD
79     echo "PERFORMING POSTBUILD:"
80 william 119 echo -e "\\tCOPYING $PCSX2_BUILD_TMP/bin/* $downstream_export_location/trunk/bin/ ... {}"
81     cp -Rfv "$PCSX2_BUILD_TMP/bin"/* "$downstream_export_location/trunk/bin/" >/dev/null 2>/dev/null
82 william 92 echo "POSTBUILD COMPLETED..."
83     # END POST BUILD
84    
85     # CLEANUP
86     echo "PERFORMING CLEANUP"
87 william 103 if [ "$DISABLE_CLEANUP" == "0" ] ; then
88 william 119 echo -e "\\tCLEANING $PCSX2_BUILD_TMP/bin/ ... {}"
89 william 103 cd "$BUILD_TMP_DIR"
90 william 119 rm -Rf "$PCSX2_BUILD_TMP" >/dev/null 2>/dev/null
91     #rm -Rf *
92 william 103 echo "CLEANUP COMPLETE..."
93     else
94 william 119 echo "CLEANUP HAS BEEN DISABLED ... to enable do not use --no-cleaup"
95 william 103 fi
96 william 92
97     echo
98     echo "AUTOBUILD COMPLETE..."
99     # perform auto tagging
100 william 105 if [ "$DISABLE_AUTO_BRANCH" == "0" ] ; then
101 william 106 # Always force auto branch update after building
102     "$downstream_export_location/auto_branch_latest_upstream.sh" --force-update
103 william 95 else
104 william 105 echo "AUTO BUILD BRANCH HAS BEEN DISABLED ... not calling auto_branch_latest_upstream.sh --> to enable do not use --no-auto-branch"
105 william 95 fi
106 william 92 else
107    
108     # CLEANUP
109     echo "PERFORMING CLEANUP"
110 william 103
111     if [ "$DISABLE_CLEANUP" == "0" ] ; then
112 william 119 echo -e "\\tCLEANING $PCSX2_BUILD_TMP/bin/ ... {}"
113 william 103 cd "$BUILD_TMP_DIR"
114 william 119 rm -Rf "$PCSX2_BUILD_TMP" >/dev/null 2>/dev/null
115     #rm -Rf *
116 william 103 echo "CLEANUP COMPLETE..."
117     else
118 william 119 echo "CLEANUP HAS BEEN DISABLED ... to enable do not use --no-cleaup"
119 william 103 fi
120 william 92 echo
121     echo "BUILD FAILED..."
122     echo
123     echo "AUTOBUILD FAILED..."
124     fi

  ViewVC Help
Powered by ViewVC 1.1.22