| 1 |
#!/bin/sh |
| 2 |
# Compresses a binary into an archived form. |
| 3 |
# |
| 4 |
# This script is used to compress a binary built from `build.sh` into an |
| 5 |
# archive. `.zip` is used for Windows and `.tar.gz` otherwise. The archive is |
| 6 |
# placed inside a directory named `dist`. |
| 7 |
|
| 8 |
set -o errexit -o nounset |
| 9 |
|
| 10 |
mkdir -p dist |
| 11 |
|
| 12 |
if [ "$GOOS" = "windows" ]; then |
| 13 |
zip "dist/lf-${GOOS}-${GOARCH}.zip" lf.exe |
| 14 |
else |
| 15 |
tar czf "dist/lf-${GOOS}-${GOARCH}.tar.gz" lf |
| 16 |
fi |
| 17 |
|
| 18 |
# vim: tabstop=4 shiftwidth=4 textwidth=80 colorcolumn=80 |