Support local.hostname properly (#59)
This commit is contained in:
parent
fda2da6a5b
commit
588bc6eafe
1 changed files with 3 additions and 3 deletions
6
yadm
6
yadm
|
@ -129,7 +129,7 @@ function alt() {
|
||||||
fi
|
fi
|
||||||
match_system="(%|$local_system)"
|
match_system="(%|$local_system)"
|
||||||
|
|
||||||
local_host="$(config local.host)"
|
local_host="$(config local.hostname)"
|
||||||
if [ -z "$local_host" ] ; then
|
if [ -z "$local_host" ] ; then
|
||||||
local_host=$(hostname)
|
local_host=$(hostname)
|
||||||
local_host=${local_host%%.*} #; trim any domain from hostname
|
local_host=${local_host%%.*} #; trim any domain from hostname
|
||||||
|
@ -328,7 +328,7 @@ EOF
|
||||||
function config() {
|
function config() {
|
||||||
|
|
||||||
use_repo_config=0
|
use_repo_config=0
|
||||||
local_options="^local\.(class|os|host|user)$"
|
local_options="^local\.(class|os|hostname|user)$"
|
||||||
for option in "$@"; do
|
for option in "$@"; do
|
||||||
[[ "$option" =~ $local_options ]] && use_repo_config=1
|
[[ "$option" =~ $local_options ]] && use_repo_config=1
|
||||||
done
|
done
|
||||||
|
@ -339,7 +339,7 @@ function config() {
|
||||||
yadm supports the following configurations:
|
yadm supports the following configurations:
|
||||||
|
|
||||||
local.class
|
local.class
|
||||||
local.host
|
local.hostname
|
||||||
local.os
|
local.os
|
||||||
local.user
|
local.user
|
||||||
yadm.auto-alt
|
yadm.auto-alt
|
||||||
|
|
Loading…
Reference in a new issue