25 lines
625 B
Bash
Executable File
25 lines
625 B
Bash
Executable File
#!/bin/sh
|
|
cat << EOF > _build.html
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta name="build" content="" >
|
|
<title>$(date +%Y-%m-%dT%H-%M-%S)</title>
|
|
<script>
|
|
window.setInterval(function (){
|
|
var request = new XMLHttpRequest();
|
|
request.open("GET", "/_build.html", false);
|
|
request.send();
|
|
if(request.response.startsWith(
|
|
"<!DOCTYPE html>\\n<html>\\n<head>\\n <meta name=\\"build\\""
|
|
)) {
|
|
location.reload();
|
|
}
|
|
}, 10000);
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<pre>$(date +%Y-%m-%dT%H-%M-%S)</pre>
|
|
</body>
|
|
EOF
|