1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20#!/usr/bin/env zsh # generate go code for binary assets like PNGs source "$ZSH_FILES/functions.zsh" echo target is $(this-script-dir) ASSETS="$(this-script-dir)/_raw" TARGET="$(this-script-dir)" generate-go-code () { go-bindata -i "$1" -p "assets" } for png in "$ASSETS/"*.png ; do generate-go-code "$png" done mv "$ASSETS"/*.png.go "$TARGET"