[arkdep] Implement ARKDEP_CONFIG
This commit is contained in:
parent
784ef43198
commit
a971b605b0
2 changed files with 17 additions and 1 deletions
16
arkdep
16
arkdep
|
@ -40,7 +40,21 @@ fi
|
||||||
## Load config file, unless we are running init
|
## Load config file, unless we are running init
|
||||||
#
|
#
|
||||||
if [[ ! $1 == 'init' ]]; then
|
if [[ ! $1 == 'init' ]]; then
|
||||||
source $arkdep_dir/config
|
if [[ -z ${ARKDEP_CONFIG+x} ]]; then
|
||||||
|
# Ensure file exists
|
||||||
|
if [[ ! -f $arkdep_dir/config ]]; then
|
||||||
|
printf "\e[1;31m<#>\e[0m\e[1m $arkdep_dir/config configuration file does not exist\e[0m\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
source $arkdep_dir/config
|
||||||
|
else
|
||||||
|
# Ensure file exists
|
||||||
|
if [[ ! -f $ARKDEP_CONFIG ]]; then
|
||||||
|
printf "\e[1;31m<#>\e[0m\e[1m $ARKDEP_CONFIG configuration file does not exist\e[0m\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
source $ARKDEP_CONFIG
|
||||||
|
fi
|
||||||
|
|
||||||
# Set default variables if config variables are undefined
|
# Set default variables if config variables are undefined
|
||||||
[[ -z ${enable_overlay+x} ]] && enable_overlay=1 && printf '\e[1;33m<!>\e[0m\e[1m enable_overlay not defined in config, using default\e[0m\n'
|
[[ -z ${enable_overlay+x} ]] && enable_overlay=1 && printf '\e[1;33m<!>\e[0m\e[1m enable_overlay not defined in config, using default\e[0m\n'
|
||||||
|
|
|
@ -35,6 +35,8 @@ Set custom /boot location, overwrites ARKDEP_ROOT on relevant tasks if set, impl
|
||||||
Do not run bootctl commands, this includes installing systemd-boot and setting the new deployment as the default boot entry.
|
Do not run bootctl commands, this includes installing systemd-boot and setting the new deployment as the default boot entry.
|
||||||
.SS ARKDEP_CONFIRM
|
.SS ARKDEP_CONFIRM
|
||||||
Skip interactive prompts.
|
Skip interactive prompts.
|
||||||
|
.SS ARKDEP_CONFIG
|
||||||
|
Override configuration file location.
|
||||||
.SH EXAMPLES
|
.SH EXAMPLES
|
||||||
.SS arkdep deploy
|
.SS arkdep deploy
|
||||||
Check for updates, if available download and deploy.
|
Check for updates, if available download and deploy.
|
||||||
|
|
Loading…
Add table
Reference in a new issue