Skip to content

Commit dc70ced

Browse files
committed
Update gendocs script
Signed-off-by: Tamal Saha <tamal@appscode.com>
1 parent 86fb04f commit dc70ced

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

hack/gendocs/make.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
pushd $GOPATH/src/stash.appscode.dev/stash/hack/gendocs
17+
set -eou pipefail
18+
19+
SCRIPT_ROOT=$(realpath $(dirname "${BASH_SOURCE[0]}")/../..)
20+
SCRIPT_NAME=$(basename "${BASH_SOURCE[0]}")
21+
pushd $SCRIPT_ROOT/hack/gendocs
22+
23+
# http://redsymbol.net/articles/bash-exit-traps/
24+
function cleanup() {
25+
popd
26+
}
27+
trap cleanup EXIT
28+
1829
go run main.go
19-
popd

0 commit comments

Comments
 (0)