Files
git.taskfile.build/bin/restore-env-files
T

13 lines
337 B
Bash
Executable File

#!/bin/bash
function restore-env-files() {
if test -z "$1"; then echo "\$1 is empty."; exit; fi
TASK_CONFIG_DIR=${TASK_CONFIG_DIR:-$HOME/.config/taskfile.build}
BACKUP_FILEPATH="$1"
echo "Restore env files from: $BACKUP_FILEPATH"
mkdir -p "$TASK_CONFIG_DIR"
tar -xzf "$BACKUP_FILEPATH" -C "$TASK_CONFIG_DIR"
}