Skip to content
This repository was archived by the owner on Aug 29, 2021. It is now read-only.

Commit 338e51b

Browse files
committed
redo: use -b with golang_filter
1 parent b24ccdc commit 338e51b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
/.gitattributes
22
/.redo
33
/bin
4+
5+
*.go.src-bak

default.do

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ grep -q filter=golang .gitattributes 2>/dev/null\
1515
|| gpp=
1616

1717
err=0
18-
[[ -z "$gpp" ]] || ls -1 $DEPS | xargs -n1 golang_filter curl
18+
[[ -z "$gpp" ]] || ls -1 $DEPS | xargs -n1 $gpp curl -b
1919

2020
output=$(mktemp)
2121
go build -o "$3" "${PROJECT}/cli" >"$output" 2>&1 || err=$?
@@ -24,12 +24,12 @@ if [[ -z "$gpp" ]]
2424
then cat "$output" >&2 ||:
2525
else
2626
gawk 'match($0, /^(src\/\S+\.go):([0-9]+):/, a) {
27-
print; system("golang_filter -n show -p -c2 -n" a[2] " " a[1]);
27+
print; system("'"$gpp"' -n show -p -c2 -n" a[2] " " a[1]);
2828
next} {print}' "$output" >&2 ||:
2929
# Doesn't highlight the relevant line:
3030
# print; system("grep -nC3 . " a[1] " | grep -3 \"^" a[2] ":\"");
3131
fi
3232
rm -f "$output" ||:
3333

34-
[[ -z "$gpp" ]] || ls -1 $DEPS | xargs -n1 golang_filter uncurl
34+
[[ -z "$gpp" ]] || ls -1 $DEPS | xargs -n1 $gpp uncurl -b
3535
exit $err

0 commit comments

Comments
 (0)