Page MenuHomec4science

gopherjs-build.sh
No OneTemporary

File Metadata

Created
Thu, Jul 25, 17:23

gopherjs-build.sh

#!/bin/bash
GOSRCFILE=$1
if [ -f "${GOSRCFILE}" ]; then
if [ ${GOSRCFILE: -3} == ".go" ]; then
# build the go code into javascript
gopherjs build -m "${GOSRCFILE}" -o "`basename "${GOSRCFILE}" .go`.js"
else
echo "Not a go source file"
fi
else
echo "Not a valid file passed as parameter"
fi

Event Timeline