summaryrefslogtreecommitdiffstats
path: root/makefu/update-channel.sh
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2018-08-29 00:24:34 +0200
committermakefu <github@syntax-fehler.de>2018-08-29 00:24:34 +0200
commit3c30bf00573a4d5bc4a47cd9178dc7cc113b91a5 (patch)
treea224532f23086ac7a49d0d6a42c233c6e0a89dc7 /makefu/update-channel.sh
parent9c516e9504003cae2abed8a6e24f0b135ac98c4f (diff)
ma krops.nix: init
Diffstat (limited to 'makefu/update-channel.sh')
-rwxr-xr-xmakefu/update-channel.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/makefu/update-channel.sh b/makefu/update-channel.sh
new file mode 100755
index 000000000..59d3c434f
--- /dev/null
+++ b/makefu/update-channel.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+dir=$(dirname $0)
+oldref=$(cat $dir/nixpkgs.json | jq -r .rev | sed 's/\(.\{7\}\).*/\1/')
+nix-shell -p nix-prefetch-git --run 'nix-prefetch-git \
+ --url https://github.com/makefu/nixpkgs \
+ --rev refs/heads/master' \
+> $dir/nixpkgs.json
+newref=$(cat $dir/nixpkgs.json | jq -r .rev | sed 's/\(.\{7\}\).*/\1/')
+echo git commit $dir/nixpkgs.json -m "nixpkgs: $oldref -> $newref"