1
0
Fork 0
mirror of synced 2024-07-16 05:46:43 -04:00

Implement alt-link wildcards (#43)

This commit is contained in:
Tim Byrne 2017-01-18 01:13:27 -06:00
parent 3ea710317a
commit eaa252f721
No known key found for this signature in database
GPG key ID: 6CBE24C2FD8CF76E

3
yadm
View file

@ -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