Commit c825290e authored by Razvan Becheriu's avatar Razvan Becheriu Committed by Razvan Becheriu
Browse files

fixed build sysrepo

parent e7b51594
...@@ -30,26 +30,39 @@ if [ $# -ne 1 ] && [ $# -ne 2 ]; then ...@@ -30,26 +30,39 @@ if [ $# -ne 1 ] && [ $# -ne 2 ]; then
echo "run: \`$0 --help\` for more help" echo "run: \`$0 --help\` for more help"
exit 0 exit 0
fi fi
if [ "$1" = "--help" ]
if [ "$1" = "--help" ]; then then
echo "sysrepo_config 'option' ['library']" echo "sysrepo_config 'option' ['library']"
echo "options:" echo "options:"
echo "--help" echo "--help"
echo " print this help message" echo " print this help message"
echo "--cflags-only-other" echo "--cflags-only-other"
echo " get cpp compilation flags" echo " get cpp compilation flags"
echo "--cflags-only-I" echo "--cflags-only-I"
echo " get include path" echo " get include path"
echo "--libs" echo "--libs"
echo " get lib path" echo " get lib path"
echo "--modversion" echo "--modversion"
echo " get version" echo " get version"
echo "--variable=SR_REPOSITORY_LOC" echo "--variable=SR_REPOSITORY_LOC"
echo " get repo path" echo " get repo path"
echo "libraries:" echo "libraries:"
echo " libsysrepo" echo " libsysrepo"
echo " libSysrepo-cpp" echo " libSysrepo-cpp"
exit 0 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 fi
if [ $# -ne 2 ]; then if [ $# -ne 2 ]; then
...@@ -78,13 +91,10 @@ if [ "$1" = "--libs" ]; 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" echo "-L${LIBYANG_PATH}/lib/ -L${SYSREPO_PATH}/lib/ -lsysrepo -lSysrepo-cpp -lyang -pthread -lpcre -lev -lavl -lprotobuf-c"
exit 0 exit 0
fi fi
if [ $1 == "--variable=SR_REPOSITORY_LOC" ]
if [ "$1" = "--modversion" ]; then then
MAJOR="1" echo "${SYSREPO_PATH}/build/repository"
MINOR="0" exit 0
PATCH="0"
echo "${MAJOR}.${MINOR}.${PATCH}"
exit 0
fi fi
if [ "$1" = "--variable=SR_REPOSITORY_LOC" ]; then if [ "$1" = "--variable=SR_REPOSITORY_LOC" ]; then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment