jjb: add lttng-tools jgalar dev jobs
[lttng-ci.git] / scripts / liburcu / build.sh
index 996e7f107bd714c115ffdb117b75f2894e07fc00..aa7fdbf3c2e69d12b9d9dea3eb96bdd5b7e3144a 100755 (executable)
 
 # Version compare functions
 verlte() {
-    [  "$1" = "`printf '%s\n%s' $1 $2 | sort -V | head -n1`" ]
+       [  "$1" = "$(printf '%s\n%s' "$1" "$2" | sort -t '.' -k 1,1 -k 2,2 -k 3,3 -k 4,4 -g | head -n1)" ]
 }
 
 verlt() {
-    [ "$1" = "$2" ] && return 1 || verlte $1 $2
+    [ "$1" = "$2" ] && return 1 || verlte "$1" "$2"
 }
 
 vergte() {
-    [  "$1" = "`printf '%s\n%s' $1 $2 | sort -V | tail -n1`" ]
+       [  "$1" = "$(printf '%s\n%s' "$1" "$2" | sort -t '.' -k 1,1 -k 2,2 -k 3,3 -k 4,4 -g | tail -n1)" ]
 }
 
 vergt() {
-    [ "$1" = "$2" ] && return 1 || vergte $1 $2
+    [ "$1" = "$2" ] && return 1 || vergte "$1" "$2"
 }
 
 
@@ -61,6 +61,17 @@ solaris11)
     export PATH="$PATH:/usr/perl5/bin"
     ;;
 
+macosx)
+    MAKE=make
+    TAR=tar
+    NPROC="getconf _NPROCESSORS_ONLN"
+    BISON="bison"
+    YACC="$BISON -y"
+    export PATH="/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
+    export CFLAGS="-I/opt/local/include"
+    export LDFLAGS="-L/opt/local/lib"
+    ;;
+
 *)
     MAKE=make
     TAR=tar
This page took 0.023522 seconds and 4 git commands to generate.