aboutsummaryrefslogtreecommitdiff
path: root/update-cht.sh
diff options
context:
space:
mode:
Diffstat (limited to 'update-cht.sh')
-rwxr-xr-xupdate-cht.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/update-cht.sh b/update-cht.sh
new file mode 100755
index 0000000..5a1d389
--- /dev/null
+++ b/update-cht.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -eu
+
+URL="https://cht.sh/:cht.sh"
+DEST="$HOME/.local/bin/cht.sh"
+TMP="$(mktemp)"
+
+curl -fsSL "$URL" -o "$TMP"
+chmod +x "$TMP"
+
+# replace atomically
+mv "$TMP" "$DEST"