提交 3d09b348 编写于 作者: G gongweibao

fix shell keywords and bugs

上级 a47e49ce
#!/bin/sh #!/bin/sh
command -v go >/dev/null 2>&1 command -v go >/dev/null 2>&1
if [ $? != 0 ]; then if [[ $? != 0 ]]; then
echo -e >&2 "Please install https://golang.org/doc/install#install" echo >&2 "Please install https://golang.org/doc/install#install"
exit 1 exit 1
fi fi
...@@ -10,8 +10,8 @@ GOPATH=/tmp/go go get -u github.com/wangkuiyi/ipynb/markdown-to-ipynb ...@@ -10,8 +10,8 @@ GOPATH=/tmp/go go get -u github.com/wangkuiyi/ipynb/markdown-to-ipynb
for file in $@ ; do for file in $@ ; do
/tmp/go/bin/markdown-to-ipynb < $file > ${file%.*}".ipynb" /tmp/go/bin/markdown-to-ipynb < $file > ${file%.*}".ipynb"
if [ $? != 0 ]; then if [[ $? != 0 ]]; then
echo -e "markdown-to-ipynb $file error" echo >&2 "markdown-to-ipynb $file error"
exit 1 exit 1
fi fi
done done
......
#!/bin/sh #!/bin/sh
command -v go >/dev/null 2>&1 command -v go >/dev/null 2>&1
if [ $? != 0 ]; then if [[ $? != 0 ]]; then
echo >&2 "Please install go https://golang.org/doc/install#install" echo >&2 "Please install go https://golang.org/doc/install#install"
exit 1 exit 1
fi fi
...@@ -13,13 +13,13 @@ cd $cur_path/../ ...@@ -13,13 +13,13 @@ cd $cur_path/../
#convert md to ipynb #convert md to ipynb
for file in */{README,README\.en}.md ; do for file in */{README,README\.en}.md ; do
/tmp/go/bin/markdown-to-ipynb < $file > ${file%.*}".ipynb" /tmp/go/bin/markdown-to-ipynb < $file > ${file%.*}".ipynb"
if [ $? != 0 ]; then if [[ $? != 0 ]]; then
echo >&2 "markdown-to-ipynb $file error" echo >&2 "markdown-to-ipynb $file error"
exit 1 exit 1
fi fi
done done
if [[ ! -z $TEST_EMBEDDED_PYTHON_SCRIPTS ]]; then if [[ -z $TEST_EMBEDDED_PYTHON_SCRIPTS ]]; then
exit 0 exit 0
fi fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册