diff options
-rw-r--r-- | Makefile | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -1,3 +1,22 @@ +EXEC != ls -l | perl -ne ' \ + if (/^-\S*x\s/) { \ + s/.* //; \ + print; \ + $$x{$$_} = 1; \ + } elsif (/^l\S*x\s/) { \ + s/ -> (.*)//; \ + $$d = $$1; \ + s/.* //; \ + push @ln, [$$_ => "$$d\n"] \ + } \ + END { \ + for (@ln) { \ + print $$_->[0] if $$x{$$_->[1]}; \ + } \ + } \ +' + install: install -m 644 *.1 /usr/local/man/man1/ - install `ls -l | perl -ne 'next if not /^[-l]\S*x\s/; s/ -> .*//; s/.* //; print'` /usr/local/bin + install $(EXEC) /usr/local/bin + ./re! `echo $(EXEC) | sed -E 's,^| ,&/usr/local/bin/,g'` |