瀏覽代碼

add ubuntucomm.sh for solve platform difference, not complete.

yuchuli 4 年之前
父節點
當前提交
d3a9dae792
共有 1 個文件被更改,包括 16 次插入0 次删除
  1. 16 0
      include/ubuntucommon.sh

+ 16 - 0
include/ubuntucommon.sh

@@ -0,0 +1,16 @@
+systemname=`uname -a`
+echo $systemname
+
+ubuntu1804="18.04."
+ubuntu1604="16.04."
+result=$(echo $systemname | grep "${ubuntu1804}")
+if [[ "$result" != "" ]]
+then
+    echo "ubuntu 18.04"
+fi
+
+result=$(echo $systemname | grep "${ubuntu1604}")
+if [[ "$result" != "" ]]
+then
+    echo "ubuntu 16.04"
+fi