about summary refs log tree commit diff
path: root/pkgs/by-name/tr/trunk-io/update.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/tr/trunk-io/update.sh')
-rwxr-xr-xpkgs/by-name/tr/trunk-io/update.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/by-name/tr/trunk-io/update.sh b/pkgs/by-name/tr/trunk-io/update.sh
new file mode 100755
index 000000000000..9110bb633527
--- /dev/null
+++ b/pkgs/by-name/tr/trunk-io/update.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p curl pcre common-updater-scripts
+
+set -eu -o pipefail
+
+version="$(curl -fsSL https://trunk.io/releases/trunk | grep -Fi 'readonly TRUNK_LAUNCHER_VERSION=' | pcregrep -o1 '"(\d+(?:\.\d+)+)"')"
+update-source-version trunk-io "$version"