summaryrefslogtreecommitdiff
path: root/sync.sh
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2016-11-23 10:09:09 (GMT)
committerJiyoung Yun <jy910.yun@samsung.com>2016-11-23 10:09:09 (GMT)
commit4b4aad7217d3292650e77eec2cf4c198ea9c3b4b (patch)
tree98110734c91668dfdbb126fcc0e15ddbd93738ca /sync.sh
parentfa45f57ed55137c75ac870356a1b8f76c84b229c (diff)
downloadcoreclr-4b4aad7217d3292650e77eec2cf4c198ea9c3b4b.zip
coreclr-4b4aad7217d3292650e77eec2cf4c198ea9c3b4b.tar.gz
coreclr-4b4aad7217d3292650e77eec2cf4c198ea9c3b4b.tar.bz2
Imported Upstream version 1.1.0upstream/1.1.0
Diffstat (limited to 'sync.sh')
-rwxr-xr-xsync.sh44
1 files changed, 44 insertions, 0 deletions
diff --git a/sync.sh b/sync.sh
new file mode 100755
index 0000000..ab0fb57
--- /dev/null
+++ b/sync.sh
@@ -0,0 +1,44 @@
+#!/usr/bin/env bash
+
+usage()
+{
+ echo "Usage: sync [-p]"
+ echo "Repository syncing script."
+ echo " -p Restore all NuGet packages for the repository"
+ echo "If no option is specified, then \"sync.sh -p\" is implied."
+ exit 1
+}
+
+working_tree_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+unprocessedBuildArgs=
+
+# Parse arguments
+if [ $# == 0 ]; then
+ buildArgs="-p"
+fi
+
+while [[ $# -gt 0 ]]
+do
+ opt="$1"
+ case $opt in
+ -h|--help)
+ usage
+ ;;
+ -p)
+ buildArgs="-p"
+ ;;
+ *)
+ unprocessedBuildArgs="$unprocessedBuildArgs $1"
+ esac
+ shift
+done
+
+$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."
+exit 0