git.iko.soy/typeable/nixpkgs
on master help sign in
rebuild-amount.sh: add --print option (PR #33693)

to allow additionally listing all the rebuilt packages.

commit4de01b67238829a1cb089f98447ee0057ef4a782 authorVladimír Čunát <vcunat@gmail.com> dateWed 10 Jan 2018, 09:36 (9 years ago) parenta904ffa
1 file changed+13−1
maintainers/scripts/rebuild-amount.sh+13−1
maintainers/scripts/rebuild-amount.sh+13−1
@@ -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+