[CalendarServer-changes] [3618] CalendarServer/trunk/support/submit
source_changes at macosforge.org
source_changes at macosforge.org
Wed Jan 28 11:18:29 PST 2009
Revision: 3618
http://trac.macosforge.org/projects/calendarserver/changeset/3618
Author: wsanchez at apple.com
Date: 2009-01-28 11:18:26 -0800 (Wed, 28 Jan 2009)
Log Message:
-----------
Add -i, -p flags
Modified Paths:
--------------
CalendarServer/trunk/support/submit
Modified: CalendarServer/trunk/support/submit
===================================================================
--- CalendarServer/trunk/support/submit 2009-01-28 16:47:18 UTC (rev 3617)
+++ CalendarServer/trunk/support/submit 2009-01-28 19:18:26 UTC (rev 3618)
@@ -32,7 +32,9 @@
# Command line
##
-build=false;
+ build=false;
+install=false;
+package=false;
submission_enabled=true;
@@ -43,32 +45,39 @@
if [ "${1-}" != "-" ]; then echo "$@"; echo; fi;
echo "Usage: ${program} release";
- echo " ${program} -b";
+ echo " ${program} -b[ip]";
echo "";
echo "Options:";
echo " -b Run buildit";
+ echo " -i Install resulting build on this system";
+ echo " -p Create a package with the resulting build";
if [ "${1-}" == "-" ]; then return 0; fi;
exit 64;
}
-while getopts 'hb' option; do
+while getopts 'hbip' option; do
case "$option" in
'?') usage; ;;
'h') usage -; exit 0; ;;
- 'b') build=true; ;;
+ 'b') build=true; ;;
+ 'i') install=true; ;;
+ 'p') package=true; ;;
esac;
done;
shift $((${OPTIND} - 1));
if ! "${build}"; then
- if [ $# == 0 ]; then usage "No release specified"; fi;
- release="$1"; shift;
+ if "${install}"; then usage "-i flag requires -b"; fi;
+ if "${package}"; then usage "-p flag requires -b"; fi;
- if ! "${submission_enabled}"; then
- echo "Submissions from this branch are not enabled.";
- exit 1;
- fi;
+ if [ $# == 0 ]; then usage "No release specified"; fi;
+ release="$1"; shift;
+
+ if ! "${submission_enabled}"; then
+ echo "Submissions from this branch are not enabled.";
+ exit 1;
+ fi;
fi;
if [ $# != 0 ]; then usage "Unrecognized arguments:" "$@"; fi;
@@ -151,9 +160,29 @@
if "${build}"; then
echo "";
echo "Building ${project_version}...";
- sudo ~rc/bin/buildit "${wc}" \
+
+ if "${package}"; then
+ package_tmp="${tmp}/pkg";
+ install -d "${package_tmp}";
+ merge_flags="-merge \"${package_tmp}\"";
+ elif "${install}"; then
+ merge_flags="-merge /";
+ fi;
+
+ sudo ~rc/bin/buildit "${wc}" CALENDARSERVER_CACHE_DEPS="${CALENDARSERVER_CACHE_DEPS-${wd}/.dependencies}" \
$(file /usr/lib/libSystem.dylib | sed -n -e 's|^.*(for architecture \([^)][^)]*\).*$|-arch \1|p' | sed 's|ppc7400|ppc|') \
- -release SnowLeopard;
+ -release SnowLeopard \
+ ${merge_flags};
+
+ if "${package}"; then
+ package_file="${project_version}.tgz";
+ echo "Creating package: ${package_file}...";
+ tar -C "${package_tmp}" -cvzf "${package_file}" .;
+ if "${install}"; then
+ echo "Installing package: ${package_file}";
+ tar -C / -xvzf "${package_file}";
+ fi;
+ fi;
else
echo "";
echo "Submitting sources for ${project_version}...";
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090128/ae950da0/attachment-0001.html>
More information about the calendarserver-changes
mailing list