[Modify the use of sudo commands]

This commit is contained in:
plum-lihui 2019-07-19 15:38:59 +08:00
parent 0e0be34d44
commit 4db1f9fa22
1 changed files with 8 additions and 2 deletions

View File

@ -2,6 +2,12 @@
#set -x #set -x
#path=`pwd` #path=`pwd`
insmetaPath="/usr/local/taos/script" insmetaPath="/usr/local/taos/script"
sudo chmod -R 744 ${insmetaPath}
csudo=""
if command -v sudo > /dev/null; then
csudo="sudo"
fi
${csudo} chmod -R 744 ${insmetaPath}
cd ${insmetaPath} cd ${insmetaPath}
sudo ./post.sh ${csudo} ./post.sh