diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2022-08-23 14:43:14 +0200 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2022-08-23 14:49:19 +0200 |
commit | 85397ca391b1d81e9b90e100209c243be99789a0 (patch) | |
tree | 0720e6c72a5032c4d28a343eca7de90437c7e726 /Tools | |
parent | MOVED: do not specify a flavor when not necessary (diff) |
MOVEDlint: accept -v blame=1 from command line
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/scripts/MOVEDlint.awk | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Tools/scripts/MOVEDlint.awk b/Tools/scripts/MOVEDlint.awk index f9d9ef35bb8d..b06a475b00c6 100755 --- a/Tools/scripts/MOVEDlint.awk +++ b/Tools/scripts/MOVEDlint.awk @@ -36,11 +36,13 @@ BEGIN { portsdir = ENVIRON["PORTSDIR"] ? ENVIRON["PORTSDIR"] : "/usr/ports" if (ARGC == 1) { ARGV[ARGC++] = portsdir "/MOVED" - if (ENVIRON["BLAME"]) { - if (!system("test -r " portsdir "/.git")) { - blame = "cd " portsdir "; git blame MOVED 2>/dev/null" - } - + } + if (ENVIRON["BLAME"]) { + blame=1 + } + if (blame) { + if (!system("test -r " portsdir "/.git")) { + blame = "cd " portsdir "; git blame MOVED 2>/dev/null" } } sort = "/usr/bin/sort -n" |