summaryrefslogtreecommitdiffstats
path: root/makefu/update-channel.sh
blob: 0899581ec02e01f87b8ab86d934b5a063ec2c879 (plain)
1
2
3
4
5
6
7
8
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 'ma nixpkgs: $oldref -> $newref'"