Explorar el Código

Merge pull request #27005 from lizzha/azurechina

Use the mirror in China for Azure China environment
Tianon Gravi hace 8 años
padre
commit
8d6e9f0c6a
Se han modificado 1 ficheros con 21 adiciones y 0 borrados
  1. 21 0
      hack/install.sh

+ 21 - 0
hack/install.sh

@@ -34,6 +34,27 @@ pgp.mit.edu
 keyserver.ubuntu.com
 "
 
+mirror=''
+while [ $# -gt 0 ]; do
+	case "$1" in
+		--mirror)
+			mirror="$2"
+			shift
+			;;
+		*)
+			echo "Illegal option $1"
+			;;
+	esac
+	shift $(( $# > 0 ? 1 : 0 ))
+done
+
+case "$mirror" in
+	AzureChinaCloud)
+		apt_url="https://mirror.azure.cn/docker-engine/apt"
+		yum_url="https://mirror.azure.cn/docker-engine/yum"
+		;;
+esac
+
 command_exists() {
 	command -v "$@" > /dev/null 2>&1
 }