warbo-utilities: 6edb701ef5a878b797dccd9a3e3c752cc74a3583
1: #!/usr/bin/env bash
2:
3: # Speeds up latestGit
4:
5: [[ -n "$GIT_REPO_DIR" ]] || export GIT_REPO_DIR=/home/chris/Programming/repos
6:
7: [[ -d "$GIT_REPO_DIR" ]] || exit 0
8:
9: for D in "$GIT_REPO_DIR"/*.git
10: do
11: REV=$(git ls-remote "$D" HEAD | cut -f1)
12: URLHASH=$(echo -n "$D" | sha256sum | cut -d ' ' -f1)
13: REFHASH=$(echo -n "HEAD" | sha256sum | cut -d ' ' -f1)
14: printf '%s\t%s\n' "nix_git_rev_${URLHASH}_${REFHASH}" "$REV"
15: done
Generated by git2html.