Sharp.Augeas/Sharp.Augeas.Test/copyLibrary.sh

23 lines
637 B
Bash
Raw Normal View History

2022-11-04 20:09:06 +03:00
#!/bin/bash
2022-11-06 20:50:22 +03:00
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
LIB_FILE=libclAugeas.so
elif [[ "$OSTYPE" == "darwin"* ]]; then
LIB_FILE=libclAugeas.dylib
fi
2022-11-04 20:09:06 +03:00
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
DESTIN=$SCRIPT_DIR/bin/Debug/net6.0
2022-11-05 05:07:41 +03:00
# Set the $CLAUG_LIB_PATH to the PATH where the claugeas library is located before running this script
if [[ -z "${CLAUG_LIB_PATH}" ]]; then
echo "error: set the CLAUG_LIB_PATH with the ${LIB_FILE} location."
2022-11-05 21:41:53 +03:00
echo
2022-11-06 20:50:22 +03:00
exit 2
2022-11-05 05:07:41 +03:00
fi
BINARY=$CLAUG_LIB_PATH/$LIB_FILE
if [ -e "$DESTIN/$LIB_FILE" ]; then
rm -fv $DESTIN/$LIB_FILE
fi
cp -v $BINARY $DESTIN