xref: /aosp_15_r20/external/okio/.buildscript/restore_v1_docs.sh (revision f9742813c14b702d71392179818a9e591da8620c)
1#!/bin/bash
2
3# Commit b3205fa199a19d6fbf13ee5c8e0c3d6d2b15b05f contains
4# Javadoc for Okio 1.x. Those should be present on
5# gh-pages and published along with the other website
6# content, but if for some reason they have to be re-added
7# to gh-pages - run this script locally.
8
9set -ex
10
11DIR=temp-clone
12
13# Delete any existing temporary website clone
14rm -rf $DIR
15
16# Clone the current repo into temp folder
17git clone . $DIR
18
19# Move working directory into temp folder
20cd $DIR
21
22# Restore docs from 1.x
23git checkout b3205fa199a19d6fbf13ee5c8e0c3d6d2b15b05f
24mkdir -p ../site
25mv ./1.x ../site/1.x
26
27# Restore docs from 2.x
28git checkout 9235ff8faca96082aa8784e789448b5f4893af69
29mkdir -p ../site
30mv ./2.x ../site/2.x
31
32# Delete our temp folder
33cd ..
34rm -rf $DIR
35