Implement alt-link wildcards (#43)
This commit is contained in:
parent
3ea710317a
commit
eaa252f721
1 changed files with 3 additions and 0 deletions
3
yadm
3
yadm
|
@ -110,9 +110,12 @@ function alt() {
|
|||
|
||||
#; regex for matching "<file>##SYSTEM.HOSTNAME.USER"
|
||||
match_system=$(uname -s)
|
||||
match_system="(%|$match_system)"
|
||||
match_host=$(hostname)
|
||||
match_host=${match_host%%.*} #; trim any domain from hostname
|
||||
match_host="(%|$match_host)"
|
||||
match_user=$(id -u -n)
|
||||
match_user="(%|$match_user)"
|
||||
match="^(.+)##($match_system|$match_system\.$match_host|$match_system\.$match_host\.$match_user|())$"
|
||||
|
||||
#; process relative to YADM_WORK
|
||||
|
|
Loading…
Reference in a new issue