Files
git.taskfile.build/bin/copy-env
T

11 lines
341 B
Bash
Executable File

#!/bin/bash
function copy-env() {
if test -z "$1"; then echo "\$1 is empty."; exit; fi
if test -z "$2"; then echo "\$2 is empty."; exit; fi
TASK_CONFIG_DIR=${TASK_CONFIG_DIR:="$HOME/.config/taskfile.build"}
SOURCE_ENV="$TASK_CONFIG_DIR/.env.$1"
TARGET_ENV="$TASK_CONFIG_DIR/.env.$2"
cp "$SOURCE_ENV" "$TARGET_ENV"
}