mirror of
https://github.com/diamondburned/cchat-gtk.git
synced 2024-12-23 04:36:49 +00:00
16 lines
302 B
Plaintext
16 lines
302 B
Plaintext
|
#!/usr/bin/env bash
|
||
|
# Script to embed a file to Go.
|
||
|
|
||
|
for file in "$@"; {
|
||
|
name="${file%.*}"
|
||
|
name="${name//[^[:alnum:]]/_}" # sanitize
|
||
|
|
||
|
file2byteslice \
|
||
|
-input "$file" \
|
||
|
-output "${name}.go" \
|
||
|
-package icons \
|
||
|
-var "__${name}"
|
||
|
|
||
|
echo "Written $file to \`var __$name'"
|
||
|
}
|