Initial commit.
This commit is contained in:
16
load-env.sh
Executable file
16
load-env.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ENV_FILE="$PROJECT_DIR/.env"
|
||||
BIN_DIR="$PROJECT_DIR/bin"
|
||||
|
||||
if [ ! -f "$ENV_FILE" ]; then
|
||||
echo "Error: Environment file not found: $ENV_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -a
|
||||
source "$ENV_FILE"
|
||||
set +a
|
||||
|
||||
export PATH="$BIN_DIR:$PATH"
|
Reference in New Issue
Block a user