make/install-lib.sh

Wed, 10 Dec 2025 14:05:20 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Wed, 10 Dec 2025 14:05:20 +0100
changeset 1563
6e2f83ef6f5a
parent 1522
d0b5eb033b2a
permissions
-rwxr-xr-x

fix memory leak in the json parser and add more tests for cxJsonFromString - relates to #777

#!/bin/sh

if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ] || [ -z "$4" ] ; then
  echo "Usage: $0 <src> <libdir> <version> <major_version> [destdir]"
  exit 1
fi

SRC=$1
LIB=`basename $1`
LIBDIR=$5$2
LIBVERSION=$3
LIBVERSION_MAJOR=$4

cp -f "$SRC" "$LIBDIR/$LIB.$LIBVERSION"

rm -f "$LIBDIR/$LIB.$LIBVERSION_MAJOR"
rm -f "$LIBDIR/$LIB"
ln -s "$LIB.$LIBVERSION" "$LIBDIR/$LIB.$LIBVERSION_MAJOR"
ln -s "$LIB.$LIBVERSION_MAJOR" "$LIBDIR/$LIB"

mercurial