tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

I'm too lazy to .include, so I wrote a script.



Here it is in all its glory.
locate ${1} | awk -F '/' '/buildlink3.mk/{print "../../"$(NF-2)"/"$(NF-1)"/"$(NF);exit}' | sed -e 's/\(.*\)/.include "\1"/g' | xclip -sel clip

Copies the appropriate .include ... thing to clipboard.

Considering adapting it to a vim plugin, but this will be useful for
people not using vim, too, so might as well post it.

Q: "Why does it only print one line, I wanna adapt this but not spend a few
minutes thinking"

A: ;exit}. Remove this.


Home | Main Index | Thread Index | Old Index