]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
fixed build sysrepo
authorRazvan Becheriu <ravan@isc.org>
Tue, 5 Mar 2019 16:27:57 +0000 (18:27 +0200)
committerRazvan Becheriu <razvan@isc.org>
Thu, 16 May 2019 15:12:40 +0000 (18:12 +0300)
tools/sysrepo_config

index c41d847116329d69270416e4539773d53bfa7afd..4bde60de2f2c4b0432007accbb2891914cff6441 100755 (executable)
@@ -30,26 +30,39 @@ if [ $# -ne 1 ] && [ $# -ne 2 ]; then
     echo "run: \`$0 --help\` for more help"
     exit 0
 fi
-
-if [ "$1" = "--help" ]; then
-    echo "sysrepo_config 'option' ['library']"
-    echo "options:"
-    echo "--help"
-    echo "    print this help message"
-    echo "--cflags-only-other"
-    echo "    get cpp compilation flags"
-    echo "--cflags-only-I"
-    echo "    get include path"
-    echo "--libs"
-    echo "    get lib path"
-    echo "--modversion"
-    echo "    get version"
-    echo "--variable=SR_REPOSITORY_LOC"
-    echo "    get repo path"
-    echo "libraries:"
-    echo "    libsysrepo"
-    echo "    libSysrepo-cpp"
-    exit 0
+if [ "$1" = "--help" ]
+then
+       echo "sysrepo_config 'option' ['library']"
+       echo "options:"
+       echo "--help"
+       echo "    print this help message"
+       echo "--cflags-only-other"
+       echo "    get cpp compilation flags"
+       echo "--cflags-only-I"
+       echo "    get include path"
+       echo "--libs"
+       echo "    get lib path"
+       echo "--modversion"
+       echo "    get version"
+       echo "--variable=SR_REPOSITORY_LOC"
+       echo "    get repo path"
+       echo "libraries:"
+       echo "    libsysrepo"
+       echo "    libSysrepo-cpp"
+       exit 0
+else if [ $# -ne 2 ]
+       then
+               echo "run: \`$0 --help\` for more help"
+               exit 0
+       else if [ $2 != "libsysrepo" ] && [ $2 != "libSysrepo-cpp" ]
+               then
+                       echo "library $2 not supported"
+                       echo "run: \`$0 --help\` for more help"
+                       exit 0
+               else
+                       sysrepo_lib=$2
+               fi
+       fi
 fi
 
 if [ $# -ne 2 ]; then
@@ -78,13 +91,10 @@ if [ "$1" = "--libs" ]; then
     echo "-L${LIBYANG_PATH}/lib/ -L${SYSREPO_PATH}/lib/ -lsysrepo -lSysrepo-cpp -lyang -pthread -lpcre -lev -lavl -lprotobuf-c"
     exit 0
 fi
-
-if [ "$1" = "--modversion" ]; then
-    MAJOR="1"
-    MINOR="0"
-    PATCH="0"
-    echo "${MAJOR}.${MINOR}.${PATCH}"
-    exit 0
+if [ $1 == "--variable=SR_REPOSITORY_LOC" ]
+then
+       echo "${SYSREPO_PATH}/build/repository"
+       exit 0
 fi
 
 if [ "$1" = "--variable=SR_REPOSITORY_LOC" ]; then