#!/bin/bash if [[ "$OSTYPE" == "linux-gnu"* ]]; then LIB_FILE=libclAugeas.so elif [[ "$OSTYPE" == "darwin"* ]]; then LIB_FILE=libclAugeas.dylib fi SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) DESTIN=$SCRIPT_DIR/bin/Debug/net6.0 # 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." echo exit 2 fi BINARY=$CLAUG_LIB_PATH/$LIB_FILE if [ -e "$DESTIN/$LIB_FILE" ]; then rm -fv $DESTIN/$LIB_FILE fi cp -v $BINARY $DESTIN