update build scripts to work with non-gnu readlink
This commit is contained in:
parent
a4c70fe77b
commit
52bafb364d
11
build-js.sh
11
build-js.sh
@ -1,10 +1,13 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
|
||||||
root=$(readlink -e $(dirname $0))
|
root=$(readlink -e $(dirname $0))
|
||||||
|
set -e
|
||||||
|
if [ "x" == "x$root" ] ; then
|
||||||
|
root=$PWD/${0##*}
|
||||||
|
fi
|
||||||
cd $root
|
cd $root
|
||||||
|
|
||||||
if [ -z "$GOPATH" ]; then
|
if [ -z "$GOPATH" ]; then
|
||||||
export GOPATH=$PWD/go
|
export GOPATH=$root/go
|
||||||
mkdir -p $GOPATH
|
mkdir -p $GOPATH
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -12,7 +15,7 @@ if [ ! -f $GOPATH/bin/minify ]; then
|
|||||||
echo "set up minifiy"
|
echo "set up minifiy"
|
||||||
go get -v github.com/tdewolff/minify/cmd/minify
|
go get -v github.com/tdewolff/minify/cmd/minify
|
||||||
fi
|
fi
|
||||||
outfile=$(readlink -e ./contrib/static/nntpchan.js)
|
outfile=$PWD/contrib/static/nntpchan.js
|
||||||
|
|
||||||
lint() {
|
lint() {
|
||||||
if [ "x$(which jslint)" == "x" ] ; then
|
if [ "x$(which jslint)" == "x" ] ; then
|
||||||
|
Reference in New Issue
Block a user