#!/usr/bin/env bash create-nextcloud-env() { if [[ -z "$1" ]]; then echo "\$1 is empty."; exit; fi init-config-dir local env_filepath="$TASK_CONFIG_DIR/.env.$1" if [[ -f "$env_filepath" ]]; then echo "Env file already exists: $env_filepath" exit 1 fi echo "Init env file: $env_filepath" echo "NEXTCLOUD_URL=" > "$env_filepath" echo "NEXTCLOUD_USERNAME=" >> "$env_filepath" echo "NEXTCLOUD_PASSWORD=" >> "$env_filepath" echo "Edit with: task edit-env $1" }