[TASK] Write first version of script
This commit is contained in:
commit
30e2470407
24
write-build-date.sh
Executable file
24
write-build-date.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/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
|
Loading…
x
Reference in New Issue
Block a user