2016-02-26 12:31:34 +00:00
|
|
|
git clone https://github.com/kubernetes/kubernetes.git k8s
|
|
|
|
cd k8s
|
|
|
|
git checkout gh-pages
|
|
|
|
cd ..
|
2016-02-26 11:54:48 +00:00
|
|
|
|
2016-03-02 03:43:10 +00:00
|
|
|
# batch fetches
|
2016-02-14 22:08:16 +00:00
|
|
|
while read line || [[ -n ${line} ]]; do
|
2016-02-26 12:31:34 +00:00
|
|
|
IFS=': ' read -a myarray <<< "${line}"
|
|
|
|
# echo "arraypos0: ${myarray[0]}"
|
|
|
|
# echo "arraypos1: ${myarray[1]}"
|
|
|
|
# echo "arraypos2: ${myarray[2]}"
|
|
|
|
if [ "${myarray[1]}" = "path" ]; then
|
|
|
|
TARGET="${myarray[2]}"
|
|
|
|
CLEARPATH="${TARGET}"
|
|
|
|
K8SSOURCE='k8s/_'${TARGET}
|
|
|
|
DESTINATION=${TARGET%/*}
|
|
|
|
rm -rf ${CLEARPATH}
|
|
|
|
mv -f ${K8SSOURCE} ${DESTINATION}
|
|
|
|
fi
|
2016-02-26 11:54:48 +00:00
|
|
|
done <_data/overrides.yml
|
2016-02-14 22:08:16 +00:00
|
|
|
|
2016-02-26 13:26:11 +00:00
|
|
|
rm -rf _includes/v1.1
|
2016-02-26 13:18:59 +00:00
|
|
|
mv -f k8s/_includes/v1.1 _includes/
|
|
|
|
cd _includes/v1.1
|
|
|
|
find . -name '*.html' -type f -exec sed -i '' '/<style>/,/<\/style>/d' {} \;
|
|
|
|
cd ..
|
|
|
|
cd ..
|
|
|
|
|
2016-02-26 12:31:34 +00:00
|
|
|
rm -rf k8s
|
2016-03-02 03:43:10 +00:00
|
|
|
|
|
|
|
# Single-file fetches
|
|
|
|
rm -rf docs/getting-started-guides/fluentd-gcp.yaml
|
|
|
|
rm -rf docs/getting-started-guides/counter-pod.yaml
|
|
|
|
rm -rf docs/user-guide/counter-pod.yaml
|
|
|
|
curl https://raw.githubusercontent.com/kubernetes/kubernetes/release-1.1/cluster/saltbase/salt/fluentd-gcp/fluentd-gcp.yaml > docs/getting-started-guides/fluentd-gcp.yaml
|
|
|
|
curl https://raw.githubusercontent.com/kubernetes/kubernetes/release-1.1/examples/blog-logging/counter-pod.yaml > docs/getting-started-guides/counter-pod.yaml
|
|
|
|
curl https://raw.githubusercontent.com/kubernetes/kubernetes/release-1.1/examples/blog-logging/counter-pod.yaml > docs/user-guide/counter-pod.yaml
|
2016-02-26 12:31:34 +00:00
|
|
|
git add .
|
|
|
|
git commit -m "Ran update-imported-docs.sh"
|
2016-02-26 12:32:18 +00:00
|
|
|
echo "Docs imported! Run 'git push' to upload them"
|