You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
519 B

#!/usr/bin/env bash
# CONSTANTS
BASEDIR=$(dirname "$0")
DEFAULT_CONFIG="$BASEDIR/../config/default.conf"
ARG1="${1:-}"
# FUNCTIONS
function usage {
echo "$(basename "$0") [--edit]"
}
function show_defaults {
echo "STORAGE_DISK=$STORAGE_DISK"
echo "STORAGE_SIZE=$STORAGE_SIZE"
echo "MEMORY=$MEMORY"
echo "SWAP=$SWAP"
echo "CPU=$CPU"
}
# MAIN
set -Eue
[[ "$ARG1" == '--help' ]] && usage && exit 1
if [[ "$ARG1" == '--edit' ]]; then
editor $DEFAULT_CONFIG
else
source $DEFAULT_CONFIG
show_defaults
fi