1
0
Fork 0
mirror of synced 2024-07-19 11:00:34 -04:00

Added username matching for alternate files

This commit is contained in:
Patrick Hof 2015-12-16 06:31:01 +01:00
parent 4e01c28602
commit 9907ddb02e

5
yadm
View file

@ -104,10 +104,11 @@ function alt() {
require_repo
#; regex for matching "<file>##SYSTEM.HOSTNAME"
#; regex for matching "<file>##SYSTEM.HOSTNAME.USER"
match_system=$(uname -s)
match_host=$(hostname -s)
match="^(.+)##($match_system|$match_system.$match_host|())$"
match_user=${USER}
match="^(.+)##($match_system|$match_system.$match_host|$match_system.$match_host.$match_user|())$"
#; process relative to YADM_WORK
YADM_WORK=$(git config core.worktree)