install: use git clone --depth=1 instead of curl

This commit is contained in:
Felix Yan 2016-08-30 13:13:39 +08:00
parent f84ff78b03
commit f779d6dd55
No known key found for this signature in database
GPG Key ID: 786C63F330D7CB92
1 changed files with 1 additions and 3 deletions

View File

@ -10,9 +10,7 @@ CONF_WITH_SERVERS=(accelerated-domains.china google.china)
CONF_SIMPLE=(bogus-nxdomain.china) CONF_SIMPLE=(bogus-nxdomain.china)
echo "Downloading latest configurations..." echo "Downloading latest configurations..."
for _conf in "${CONF_WITH_SERVERS[@]}" "${CONF_SIMPLE[@]}"; do git clone --depth=1 https://github.com/felixonmars/dnsmasq-china-list.git "$WORKDIR"
curl -L -o "$WORKDIR/$_conf.conf" "https://github.com/felixonmars/dnsmasq-china-list/raw/master/$_conf.conf"
done
echo "Removing old configurations..." echo "Removing old configurations..."
for _conf in "${CONF_WITH_SERVERS[@]}" "${CONF_SIMPLE[@]}"; do for _conf in "${CONF_WITH_SERVERS[@]}" "${CONF_SIMPLE[@]}"; do