Commit 5caefc695f3b
Changed files (2)
tools
nixpkgs-consolidate
tools/nixpkgs-consolidate/default.nix
@@ -1,11 +1,4 @@
-{
- lib,
- stdenv,
- bash,
- git,
- curl,
- coreutils,
-}:
+{ lib, stdenv }:
stdenv.mkDerivation {
pname = "nixpkgs-consolidate";
tools/nixpkgs-consolidate/nixpkgs-consolidate.sh
@@ -232,13 +232,15 @@ consolidate_branches() {
fi
# Count commits
- local branch_commit_count=$(echo "$COMMITS" | wc -l)
+ local branch_commit_count
+ branch_commit_count=$(echo "$COMMITS" | wc -l)
log "Found $branch_commit_count commit(s) to cherry-pick"
# Cherry-pick each commit
for commit in $COMMITS; do
FAILED_COMMIT="$commit"
- local commit_msg=$(git log -1 --pretty=format:%s "$commit")
+ local commit_msg
+ commit_msg=$(git log -1 --pretty=format:%s "$commit")
log "Cherry-picking $commit: $commit_msg"
if ! git cherry-pick "$commit" 2>&1 | tee -a "$LOG_FILE"; then
@@ -325,7 +327,8 @@ main() {
fi
# Success notification
- local branches_str=$(IFS=$'\n'; echo "${COMPLETED_BRANCHES[*]}")
+ local branches_str
+ branches_str=$(IFS=$'\n'; echo "${COMPLETED_BRANCHES[*]}")
local success_msg="Consolidated ${#COMPLETED_BRANCHES[@]} branch(es) into $NIXPKGS_CONSOLIDATED_BRANCH
Base: $BASE_BRANCH