]> git.stg.codes - stg.git/blobdiff - projects/sgauth/build
Improved release version checking.
[stg.git] / projects / sgauth / build
index bd21df21d3dc56d794d41537a2ea6854c0896e55..5364845562bee841bb272d26f5af4ef2e74aeed5 100755 (executable)
@@ -7,7 +7,8 @@
 
 OS=unknown
 sys=`uname -s`
-release=`uname -r | cut -b1`
+release=`uname -r`
+major=`printf "%s" "$release" | cut -d. -f1`
 BUILD_DIR=`pwd`
 CONFFILE="../../Makefile.conf"
 PREFIX="/"
@@ -35,13 +36,12 @@ LDFLAGS="$LDFLAGS -L/usr/local/lib"
 if [ "$sys" = "Linux" ]
 then
     OS=linux
-    release=""
     MAKE="make"
 fi
 
 if [ "$sys" = "FreeBSD" ]
 then
-    case $release in
+    case $major in
         4) OS=bsd;;
         5) OS=bsd5;;
         6) OS=bsd5;;