Browse Source

Remove echo -e because it's not available on Travis.

Instead, files.go gets piped through gofmt.
pull/87/head
Johannes 'fish' Ziemke 12 years ago
parent
commit
a985a723a1
  1. 2
      Makefile
  2. 8
      utility/embed-static.sh

2
Makefile

@ -19,7 +19,7 @@ test: build
go test ./...
build:
./utility/embed-static.sh web/static web/templates > web/blob/files.go
./utility/embed-static.sh web/static web/templates | gofmt > web/blob/files.go
cat web/blob/files.go
$(MAKE) -C model
go build ./...

8
utility/embed-static.sh

@ -10,17 +10,17 @@ CDIR=`pwd`
for dir in $@
do
cd "$dir"
echo -e "\t\"`basename $dir`\": {"
echo "\"`basename $dir`\": {"
find -type f | while read file
do
name=`echo "$file"|sed 's|\.\/||'`
echo -e "\t\t\"$name\": {"
echo "\"$name\": {"
gzip -9 -c "$file" | xxd -p |sed 's/\(..\)/0x\1, /g'
echo -e "\t\t},"
echo "},"
echo
done
echo -e "\t},"
echo "},"
cd $CDIR
done
echo '}'

Loading…
Cancel
Save