| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- installpath=`go env GOPATH | awk -F ':' '{print $1}'`/bin
- buildmql() {
- echo build
- CGO_ENABLED=0 go test -o ./mql -c -args
- echo build linux
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go test -o ${installpath}/matrix/mql/mql -c -args
- echo build arm64
- CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go test -o ${installpath}/matrix/mql/mql_arm -c -args
- echo build darwin
- CGO_ENABLED=0 GOOS=darwin go test -o ${installpath}/matrix/mql/mql_mac -c -args
- echo build windows
- CGO_ENABLED=0 GOOS=windows go test -o ${installpath}/matrix/mql/mql.exe -c -args
- echo build loong64
- CGO_ENABLED=0 GOOS=linux GOARCH=loong64 go test -o ${installpath}/matrix/mql/mql_loong -c -args
- cp ${installpath}/matrix/mql/mql ${installpath}/linux_amd64
- echo "${newdirinfo}" > mqldirinfo
- }
- newdirinfo=`ls -lrt *.go`
- dirinfo=`cat mqldirinfo`
- if [[ "${dirinfo}" != "${newdirinfo}" || "$1" == "force" ]]; then
- buildmql
- fi
- # ls -l | grep '^d' | awk '{print $9}' | xargs -I % cp -rf % ${installpath}/matrix/mql
- cp initkeyspace.sh ${installpath}/matrix/mql
- cp initkeyspace.sh ${installpath}/linux_amd64
- cp mqltest.sh ${installpath}/matrix/mql
- cp mqltest.sh ${installpath}/linux_amd64
- cp oktest.sh ${installpath}/matrix/mql
- cp oktest.sh ${installpath}/linux_amd64
- cp pprof.sh ${installpath}/matrix/mql
- cp pprof.sh ${installpath}/linux_amd64
- cp ${installpath}/linux_amd64/msh ${installpath}/matrix/mql
- ./syncmql.sh
|