first commit
This commit is contained in:
25
archiso/airootfs/home/smart/SmartOrganizer/lib.conf
Executable file
25
archiso/airootfs/home/smart/SmartOrganizer/lib.conf
Executable file
@@ -0,0 +1,25 @@
|
||||
version_compare()
|
||||
{
|
||||
source=(${1//./ })
|
||||
target=(${2//./ })
|
||||
for ((i=0; i<${#source[@]}; i++)); do
|
||||
if [[ ${source[i]} == ${target[i]} ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ ${source[i]} -lt ${target[i]} ]]; then
|
||||
echo -1
|
||||
return
|
||||
elif [[ ${source[i]} -gt ${target[i]} ]]; then
|
||||
echo 1
|
||||
return
|
||||
fi
|
||||
done
|
||||
echo 0
|
||||
}
|
||||
|
||||
getSystemVersion()
|
||||
{
|
||||
releasetmp=`cat /etc/redhat-release | awk -Frelease '{print $2}' | awk -F. '{print $1}' | awk '{print $1}'`
|
||||
echo $releasetmp
|
||||
}
|
||||
Reference in New Issue
Block a user