Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
fangshunjian
2018-10-18 16:03:04 +08:00

View File

@@ -21,8 +21,18 @@
# resolve links - $0 may be a softlink # resolve links - $0 may be a softlink
PRG="$0" PRG="$0"
#OS_TYPE=$( lsb_release -d| cut -d: -f2| cut -f2 ) if [ -f /etc/redhat-release ]; then
#echo $OS_TYPE OS_TYPE=`cat /etc/redhat-release`
else
islsb=`which lsb_release | wc -l`
if [ "$islsb" != "0" ]; then
OS_TYPE=$( lsb_release -d| cut -d: -f2| cut -f2 )
else
OS_TYPE=`uname -a | awk '{print $1" "$2" "$3}'`
fi
fi
echo $OS_TYPE
while [ -h "$PRG" ]; do while [ -h "$PRG" ]; do
ls=`ls -ld "$PRG"` ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'` link=`expr "$ls" : '.*-> \(.*\)$'`