Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Network Health
sbws
Commits
0f2ea046
Commit
0f2ea046
authored
Apr 20, 2018
by
Matt Traudt
Browse files
Add script that call be called from cron to update the docs html
parent
7599e9d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/maint/update-website
0 → 100755
View file @
0f2ea046
#!/usr/bin/env bash
set
-e
function
cleanup
{
echo
-n
''
}
trap
cleanup EXIT
function
fail_hard
{
echo
"
$1
"
exit
1
}
make
=
$(
which gmake &>/dev/null
&&
echo
"gmake"
||
echo
"make"
)
venv
=
$(
pwd
)
/venv
sbws_repo
=
"
$1
"
[
-d
"
$venv
"
]
||
fail_hard
"
$venv
doesn't exist"
[
!
-z
"
$sbws_repo
"
]
||
fail_hard
"
$0
<sbws_repo>"
[
-d
"
$sbws_repo
"
]
||
fail_hard
"
$sbws_repo
doesn't exist"
pushd
"
$sbws_repo
"
git pull
source
"
$venv
/bin/activate"
pip
install
-U
--upgrade-strategy
eager .[doc]
pushd
docs
$make
html
popd
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment