x icon indicating copy to clipboard operation
x copied to clipboard

_scripts: replace *.sh files with *.go equivalents

Open ghost opened this issue 8 years ago • 3 comments

any chance you can convert the scripts to mage.go https://magefile.org/

makes running on all desktops ( ie windoze) way way easier.

Great helper script :) github.com/zvelo/zmage

here is a good example using it https://github.com/zvelo/cobratest

--

I use mage and vgo for everything and it really helped making cross platform stuff much cleaner and easier.

ghost avatar Apr 18 '18 09:04 ghost

I think I'll just replace _scripts/*.sh with plain .go files; because I have a load of helpers I'll then use via myitcv.io/cmd/pkgconcat. But thanks for raising the issue; it's on my TODO list.

myitcv avatar Apr 18 '18 10:04 myitcv

that will do the trick.

pkgconcat is a funny beast. i se what is does but am curious how it came to be... ?

ghost avatar Apr 18 '18 10:04 ghost

Inspired by "A little copying is better than a little dependency." - https://www.youtube.com/watch?v=PAAkCSZUG1c&t=9m28s

It allows me to "template" programs without creating dependencies. And in some cases it is more natural to "copy" a package than use it as an import (e.g. https://godoc.org/github.com/codeskyblue/go-sh)

Unfortunately I found out after writing it (despite having Googled) that there is prior art:

https://godoc.org/golang.org/x/tools/cmd/bundle

myitcv avatar Apr 18 '18 11:04 myitcv