diff options
author | kali <kali@leap.se> | 2018-09-26 20:36:18 +0200 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2018-09-26 20:43:51 +0200 |
commit | b26241ce8ec2b992b4209677ea75df608964cdbf (patch) | |
tree | 237b93bf1173cd4207e960cad6ff0c3c2104a75f /vendor/github.com/getlantern/systray/example/icon/make_icon.sh | |
parent | f1e820ba1664cc1d3f69e15d0356552fecaf6fcd (diff) |
[pkg] vendor getlantern/systray
this is a workaround for riseup_vpn#28
Diffstat (limited to 'vendor/github.com/getlantern/systray/example/icon/make_icon.sh')
-rw-r--r-- | vendor/github.com/getlantern/systray/example/icon/make_icon.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/vendor/github.com/getlantern/systray/example/icon/make_icon.sh b/vendor/github.com/getlantern/systray/example/icon/make_icon.sh new file mode 100644 index 0000000..e707373 --- /dev/null +++ b/vendor/github.com/getlantern/systray/example/icon/make_icon.sh @@ -0,0 +1,36 @@ +#/bin/sh + +if [ -z "$GOPATH" ]; then + echo GOPATH environment variable not set + exit +fi + +if [ ! -e "$GOPATH/bin/2goarray" ]; then + echo "Installing 2goarray..." + go get github.com/cratonica/2goarray + if [ $? -ne 0 ]; then + echo Failure executing go get github.com/cratonica/2goarray + exit + fi +fi + +if [ -z "$1" ]; then + echo Please specify a PNG file + exit +fi + +if [ ! -f "$1" ]; then + echo $1 is not a valid file + exit +fi + +OUTPUT=iconunix.go +echo Generating $OUTPUT +echo "//+build linux darwin" > $OUTPUT +echo >> $OUTPUT +cat "$1" | $GOPATH/bin/2goarray Data icon >> $OUTPUT +if [ $? -ne 0 ]; then + echo Failure generating $OUTPUT + exit +fi +echo Finished |