@@ -1,9 +1,16 @@
11#!/usr/bin/env bash
22set -e
33
4+# --print: avoid dependency on environment
5+optPrint=
6+if [ "$1" == "--print" ]; then
7+ optPrint=true
8+ shift
9+fi
10+
411if [ "$#" != 1 ] && [ "$#" != 2 ]; then
512 cat <<-EOF
6− Usage: $0 commit-spec [commit-spec]
13+ Usage: $0 [--print] commit-spec [commit-spec]
714 You need to be in a git-controlled nixpkgs tree.
815 The current state of the tree will be used if the second commit is missing.
916 EOF
@@ -113,3 +120,8 @@ newPkgs "${tree[1]}" "${tree[2]}" '--argstr system "x86_64-linux"' > "$newlist"
113120sed -n 's/\([^. ]*\.\)*\([^. ]*\) .*$/\2/p' < "$newlist" \
114121 | sort | uniq -c
115122
123+if [ -n "$optPrint" ]; then
124+ echo
125+ cat "$newlist"
126+fi
127+