]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
fixed merge
authorRazvan Becheriu <ravan@isc.org>
Wed, 6 Mar 2019 16:59:53 +0000 (18:59 +0200)
committerRazvan Becheriu <ravan@isc.org>
Wed, 6 Mar 2019 16:59:53 +0000 (18:59 +0200)
1  2 
tools/sysrepo_config

index 0758aa0c6cecfa9da1fd8c7405c69aa1c77ecbce,4a41ace831917339eb8e6b99f50506b4955cb494..42b8f1dbbbc6931b806925a6a00e8e15f1be15ad
@@@ -22,70 -35,68 +35,70 @@@ source "${DIR}/sysrepo_config_defines.s
  
  if [ $# -ne 1 ] && [ $# -ne 2 ]
  then
-       echo "run: \`$0 --help\` for more help"
+       echo "run: \`$0 --help\` for more help1"
        exit 0
  fi
- if [ $1 == "--help" ]
+ 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
+     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
  fi
- if [ $1 == "--cflags-only-other" ]
- then
-       exit 0
+ if [ $# -ne 2 ]; then
+     echo "Incorrect number of parameters specified"
+     echo "run: \`$0 --help\` for more help2"
+     exit 0
 -elif [ "$2" != "libsysrepo" ]; then
++elif [ "$2" != "libsysrepo" ] and [ "$2" != "libSysrepo-cpp" ]; then
+     echo "library $2 not supported"
+     echo "run: \`$0 --help\` for more help"
+     exit 0
+ else
+     sysrepo_lib=$2
  fi
- if [ $1 == "--cflags-only-I" ]
- then
-       echo "-I${SYSREPO_PATH}/include/"
-       exit 0
+ if [ "$1" = "--cflags-only-other" ]; then
+     exit 0
  fi
- if [ $1 == "--libs" ]
- then
- # Earlier versions also required -lprotobuf, but it is no longer needed.
-       echo "-L${SYSREPO_PATH}/lib/ -L${YANG_LIBRARY_PATH} -lsysrepo -lSysrepo-cpp -lyang -pthread -lpcre -lev -lavl -lprotobuf-c"
-       exit 0
+ if [ "$1" = "--cflags-only-I" ]; then
 -    echo "-I${SYSREPO_PATH}/inc/"
++    echo "-I${SYSREPO_PATH}/include/"
+     exit 0
  fi
- if [ $1 == "--modversion" ]
- then
-       MAJOR="1"
-       MINOR="0"
-       PATCH="0"
-       echo "${MAJOR}.${MINOR}.${PATCH}"
-       exit 0
+ if [ "$1" = "--libs" ]; then
+     # Earlier versions also required -lprotobuf, but it is no longer needed.
 -    echo "-L${SYSREPO_PATH}/build/src -L${SYSREPO_PATH}/build/swig -L$YANG_LIBRARY_PATH -l:${sysrepo_lib}.a -lSysrepo-cpp -lyang -pthread -lpcre -lev -lavl -lprotobuf-c"
++    echo "-L${SYSREPO_PATH}/lib/ -L${YANG_LIBRARY_PATH} -lsysrepo -lSysrepo-cpp -lyang -pthread -lpcre -lev -lavl -lprotobuf-c"
+     exit 0
  fi
- if [ $1 == "--variable=SR_REPOSITORY_LOC" ]
- then
-       echo "${SYSREPO_PATH}/build/repository"
-       exit 0
+ if [ "$1" == "--modversion" ]; then
+     MAJOR="1"
+     MINOR="0"
+     PATCH="0"
+     echo "${MAJOR}.${MINOR}.${PATCH}"
+     exit 0
  fi
+ if [ "$1" == "--variable=SR_REPOSITORY_LOC" ]; then
+     echo "${SYSREPO_PATH}/build/repository"
++    exit 0
+ fi
  echo "wrong parameter"
  echo "run: \`$0 --help\` for more help"