#!/bin/bash

[ -r ../env ] && . ../env
[ -r env ] && . ./env

[ -z "$INSTALL_FILE" ] && echo "Check env values && exit 1
[ -z "$INSTALL_BIN_PATH" ] && echo "Check env values && exit 1

echo "------------------------------"
echo "Install nu plugins in $INSTALL_BIN_PATH ..."
echo "------------------------------"
cp -pv nu_plugin* $INSTALL_BIN_PATH

if [ -x "$INSTALL_FILE" ] ; then 
   echo "------------------------------"
   echo "To add plugins to Nushell run: "
   echo "./$INSTALL_FILE"
fi

