You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2022/07/19 14:23:57 UTC
[iotdb] branch master updated: format grafana-plugin/backend-compile.sh (#6720)
This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 6c08a31996 format grafana-plugin/backend-compile.sh (#6720)
6c08a31996 is described below
commit 6c08a319969e476bc8ca100035f0786c34ec721e
Author: 张正明 <87...@qq.com>
AuthorDate: Tue Jul 19 22:23:52 2022 +0800
format grafana-plugin/backend-compile.sh (#6720)
---
grafana-plugin/backend-compile.sh | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/grafana-plugin/backend-compile.sh b/grafana-plugin/backend-compile.sh
index f01d896e74..f157e63080 100755
--- a/grafana-plugin/backend-compile.sh
+++ b/grafana-plugin/backend-compile.sh
@@ -1,4 +1,4 @@
-#/bin/bash
+#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
@@ -17,19 +17,19 @@
# specific language governing permissions and limitations
# under the License.
#
-exists_env=`go version|grep -c "go version"`
-if [ $exists_env -eq 0 ];then
-echo "Need to install go environment"
-exit 1
+exists_env=$(go version | grep -c "go version")
+if [ $exists_env -eq 0 ]; then
+ echo "Need to install go environment"
+ exit 1
fi
-work_path=`pwd|sed 's/\"//g'`
+work_path=$(pwd | sed 's/\"//g')
echo $work_path
go get -u github.com/grafana/grafana-plugin-sdk-go
go mod tidy
-check_results=`go env |grep GOPATH= | sed 's/\"//g'`
+check_results=$(go env | grep GOPATH= | sed 's/\"//g')
go_path=${check_results/GOPATH=/}
cd $go_path/pkg/mod/github.com/magefile/mage@v1.13.0
chmod 755 $go_path/pkg/mod/github.com/magefile/*
go run $go_path/pkg/mod/github.com/magefile/mage@v1.13.0/bootstrap.go
cd $work_path
-$go_path/bin/mage -v
\ No newline at end of file
+$go_path/bin/mage -v