X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=sync.sh;h=ab0fb578c5cb573728ac711ad9cb84fbafb69550;hb=4a9a8930bf56d851302a481c5ebf3a2ce929a390;hp=e1b6401fc17257b4256ab0a2962e6f14070a4d8c;hpb=08832577f09faf9176de87bf49765ae7bbdf8e62;p=platform%2Fupstream%2Fcoreclr.git diff --git a/sync.sh b/sync.sh index e1b6401..ab0fb57 100755 --- a/sync.sh +++ b/sync.sh @@ -2,31 +2,22 @@ usage() { - echo "Usage: sync [-p] [-s]" + echo "Usage: sync [-p]" echo "Repository syncing script." - echo " -s Fetch source history from all configured remotes" - echo " (git fetch --all -p -v)" echo " -p Restore all NuGet packages for the repository" - echo - echo "If no option is specified, then \"sync.sh -p -s\" is implied." + echo "If no option is specified, then \"sync.sh -p\" is implied." exit 1 } working_tree_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -sync_log=$working_tree_root/sync.log - -options="/nologo /v:minimal /clp:Summary /flp:v=detailed;Append;LogFile=$sync_log" unprocessedBuildArgs= -echo "Running sync.sh $*" > $sync_log - # Parse arguments if [ $# == 0 ]; then - sync_packages=true - sync_src=true + buildArgs="-p" fi -while [[ $# > 0 ]] +while [[ $# -gt 0 ]] do opt="$1" case $opt in @@ -34,10 +25,7 @@ do usage ;; -p) - sync_packages=true - ;; - -s) - sync_src=true + buildArgs="-p" ;; *) unprocessedBuildArgs="$unprocessedBuildArgs $1" @@ -45,32 +33,12 @@ do shift done -echo "Running init-tools.sh" -$working_tree_root/init-tools.sh - -if [ "$sync_src" == true ]; then - echo "Fetching git database from remote repos..." - git fetch --all -p -v >> $sync_log 2>&1 - if [ $? -ne 0 ]; then - echo -e "\ngit fetch failed. Aborting sync." >> $sync_log - echo "ERROR: An error occurred while fetching remote source code; see $sync_log for more details." - exit 1 - fi -fi - -if [ "$sync_packages" == true ]; then - options="$options /t:RestoreNETCorePlatforms /p:RestoreDuringBuild=true" - echo "Restoring all packages..." - echo -e "\n$working_tree_root/Tools/corerun $working_tree_root/Tools/MSBuild.exe $working_tree_root/build.proj $options $unprocessedBuildArgs" >> $sync_log - $working_tree_root/Tools/corerun $working_tree_root/Tools/MSBuild.exe $working_tree_root/build.proj $options $unprocessedBuildArgs - if [ $? -ne 0 ] - then - echo -e "\nPackage restored failed. Aborting sync." >> $sync_log - echo "ERROR: An error occurred while syncing packages; see $sync_log for more details. There may have been networking problems, so please try again in a few minutes." - exit 1 - fi +$working_tree_root/run.sh sync $buildArgs $unprocessedBuildArgs +if [ $? -ne 0 ] +then + echo "ERROR: An error occurred while syncing packages; See $working_tree_root/sync.log for more details. There may have been networking problems, so please try again in a few minutes." + exit 1 fi echo "Sync completed successfully." -echo -e "\nSync completed successfully." >> $sync_log -exit 0 \ No newline at end of file +exit 0