about summary refs log tree commit diff
path: root/pkgs/tools/filesystems/ssdfs-utils/update.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/filesystems/ssdfs-utils/update.sh')
-rwxr-xr-xpkgs/tools/filesystems/ssdfs-utils/update.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/pkgs/tools/filesystems/ssdfs-utils/update.sh b/pkgs/tools/filesystems/ssdfs-utils/update.sh
new file mode 100755
index 0000000000000..b30d7bd3357c3
--- /dev/null
+++ b/pkgs/tools/filesystems/ssdfs-utils/update.sh
@@ -0,0 +1,14 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p curl gnugrep common-updater-scripts
+set -euo pipefail
+
+owner=dubeyko
+repo=ssdfs-tools
+
+version="$(curl --silent https://raw.githubusercontent.com/${owner}/${repo}/master/configure.ac | \
+    grep 'AC_INIT(ssdfs' | \
+    egrep -o '[0-9\.]{3,}')"
+
+rev=$(curl -s -H "Accept: application/vnd.github.VERSION.sha" https://api.github.com/repos/${owner}/${repo}/commits/master)
+
+update-source-version ssdfs-utils "$version" --rev="$rev"