diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-10-19 12:35:59 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-10-20 22:34:55 +0200 |
commit | 95abdd4dde6c49544d8d6c0460b3209374c63f4c (patch) | |
tree | 5c9b196527b3ba3e1bd215cb5eca57e8cbbfa547 | |
parent | 126ed8cadc9b5754869b934f34aa4ec46cf96a05 (diff) | |
download | server-95abdd4dde6c49544d8d6c0460b3209374c63f4c.tar.gz |
Tool to "force" a reload of a game by clients.
Add a random suffix to the script and stylesheet links in play.html
-rw-r--r-- | tools/force-reload.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/force-reload.sh b/tools/force-reload.sh new file mode 100644 index 0000000..e19b6cd --- /dev/null +++ b/tools/force-reload.sh @@ -0,0 +1,8 @@ +for FILE in $* +do + V=$RANDOM + sed -i -e '/<link/s/client.css.*"/client.css?v='$V'"/' "$FILE" + sed -i -e '/<link/s/play.css.*"/play.css?v='$V'"/' "$FILE" + sed -i -e '/<script/s/client.js.*"/client.js?v='$V'"/' "$FILE" + sed -i -e '/<script/s/play.js.*"/play.js?v='$V'"/' "$FILE" +done |