From: Maxim Mamontov Date: Sun, 18 Jan 2015 20:38:55 +0000 (+0200) Subject: Improved release version checking. X-Git-Tag: 2.409~210 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/4afaecdd25eb53949f523e5d4891d5dbbfadb63d?ds=sidebyside;hp=7da963e5f936a329b63c308e4031b59390f42a92 Improved release version checking. --- diff --git a/projects/libs/build b/projects/libs/build index 7b18b48a..aa4f2c10 100755 --- a/projects/libs/build +++ b/projects/libs/build @@ -27,7 +27,8 @@ OWNER=root 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" @@ -51,13 +52,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;; diff --git a/projects/rscriptd/build b/projects/rscriptd/build index 68a64f87..5af638eb 100755 --- a/projects/rscriptd/build +++ b/projects/rscriptd/build @@ -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;; diff --git a/projects/sgauth/build b/projects/sgauth/build index bd21df21..53648455 100755 --- a/projects/sgauth/build +++ b/projects/sgauth/build @@ -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;; diff --git a/projects/sgauthstress/build b/projects/sgauthstress/build index 8da9ac67..8f3395f9 100755 --- a/projects/sgauthstress/build +++ b/projects/sgauthstress/build @@ -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;; diff --git a/projects/sgconf/build b/projects/sgconf/build index 721d507c..a498e0c5 100755 --- a/projects/sgconf/build +++ b/projects/sgconf/build @@ -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;; diff --git a/projects/sgconf_xml/build b/projects/sgconf_xml/build index 3e019e7c..e6982f4c 100755 --- a/projects/sgconf_xml/build +++ b/projects/sgconf_xml/build @@ -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;; diff --git a/projects/sgconv/build b/projects/sgconv/build index a458e05f..e8ad9200 100755 --- a/projects/sgconv/build +++ b/projects/sgconv/build @@ -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="/" @@ -36,13 +37,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;; diff --git a/projects/stargazer/build b/projects/stargazer/build index 83f62b46..488836cb 100755 --- a/projects/stargazer/build +++ b/projects/stargazer/build @@ -27,7 +27,8 @@ OWNER=root 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" VAR_DIR="./inst/var/stargazer" @@ -54,14 +55,13 @@ LDFLAGS="$LDFLAGS -L/usr/local/lib" if [ "$sys" = "Linux" ] then OS=linux - release="" ETC_DIR="./inst/linux/etc/stargazer" MAKE="make" fi if [ "$sys" = "FreeBSD" ] then - case $release in + case $major in 4) OS=bsd;; 5) OS=bsd5;; 6) OS=bsd5;;