1
0
Fork 0
mirror of synced 2024-11-10 11:48:58 -05:00

Identify yadm's configuration using $YADM_CONFIG

This commit is contained in:
Tim Byrne 2020-07-08 02:03:52 -05:00
parent 7f48942934
commit b056051603
No known key found for this signature in database
GPG key ID: 14DB4FC2465A4B12

5
yadm
View file

@ -251,9 +251,8 @@ function record_score() {
done done
# if we don't find an existing index, create one by appending to the array # if we don't find an existing index, create one by appending to the array
if [ "$index" -eq -1 ]; then if [ "$index" -eq -1 ]; then
# The configuration must be the first alt of the list. # $YADM_CONFIG must be processed first, in case other templates lookup yadm configurations
# This ensures that if any templates uses "yadm config some-confid", the config will be available. if [ "$tgt" = "$YADM_CONFIG" ]; then
if [ "$tgt" = "$YADM_DIR/.config/yadm/config" ]; then
alt_targets=("$tgt" "${alt_targets[@]}") alt_targets=("$tgt" "${alt_targets[@]}")
alt_scores=(0 "${alt_scores[@]}") alt_scores=(0 "${alt_scores[@]}")
index=0 index=0