1*f9742813SAndroid Build Coastguard Worker#!/bin/bash 2*f9742813SAndroid Build Coastguard Worker 3*f9742813SAndroid Build Coastguard Worker# Commit b3205fa199a19d6fbf13ee5c8e0c3d6d2b15b05f contains 4*f9742813SAndroid Build Coastguard Worker# Javadoc for Okio 1.x. Those should be present on 5*f9742813SAndroid Build Coastguard Worker# gh-pages and published along with the other website 6*f9742813SAndroid Build Coastguard Worker# content, but if for some reason they have to be re-added 7*f9742813SAndroid Build Coastguard Worker# to gh-pages - run this script locally. 8*f9742813SAndroid Build Coastguard Worker 9*f9742813SAndroid Build Coastguard Workerset -ex 10*f9742813SAndroid Build Coastguard Worker 11*f9742813SAndroid Build Coastguard WorkerDIR=temp-clone 12*f9742813SAndroid Build Coastguard Worker 13*f9742813SAndroid Build Coastguard Worker# Delete any existing temporary website clone 14*f9742813SAndroid Build Coastguard Workerrm -rf $DIR 15*f9742813SAndroid Build Coastguard Worker 16*f9742813SAndroid Build Coastguard Worker# Clone the current repo into temp folder 17*f9742813SAndroid Build Coastguard Workergit clone . $DIR 18*f9742813SAndroid Build Coastguard Worker 19*f9742813SAndroid Build Coastguard Worker# Move working directory into temp folder 20*f9742813SAndroid Build Coastguard Workercd $DIR 21*f9742813SAndroid Build Coastguard Worker 22*f9742813SAndroid Build Coastguard Worker# Restore docs from 1.x 23*f9742813SAndroid Build Coastguard Workergit checkout b3205fa199a19d6fbf13ee5c8e0c3d6d2b15b05f 24*f9742813SAndroid Build Coastguard Workermkdir -p ../site 25*f9742813SAndroid Build Coastguard Workermv ./1.x ../site/1.x 26*f9742813SAndroid Build Coastguard Worker 27*f9742813SAndroid Build Coastguard Worker# Restore docs from 2.x 28*f9742813SAndroid Build Coastguard Workergit checkout 9235ff8faca96082aa8784e789448b5f4893af69 29*f9742813SAndroid Build Coastguard Workermkdir -p ../site 30*f9742813SAndroid Build Coastguard Workermv ./2.x ../site/2.x 31*f9742813SAndroid Build Coastguard Worker 32*f9742813SAndroid Build Coastguard Worker# Delete our temp folder 33*f9742813SAndroid Build Coastguard Workercd .. 34*f9742813SAndroid Build Coastguard Workerrm -rf $DIR 35