lib/pvl/apply/cmd.sh
changeset 629 7214fe5c6fac
parent 628 b10ad946d01d
child 671 72143af5afbd
equal deleted inserted replaced
628:b10ad946d01d 629:7214fe5c6fac
    14     # compare
    14     # compare
    15     if [ -e "$out" -a -z "$APPLY_DIFF" ]; then
    15     if [ -e "$out" -a -z "$APPLY_DIFF" ]; then
    16         debug "  changes:"
    16         debug "  changes:"
    17 
    17 
    18         # terse
    18         # terse
    19         indent "        " diff --unified=1 "$out" "$tmp" || true
    19         cmd_indent "        " diff --unified=1 "$out" "$tmp" || true
    20     fi
    20     fi
    21     
    21     
    22     # deploy
    22     # deploy
    23     if [ "$APPLY" = 0 ]; then
    23     if [ "$APPLY" = 0 ]; then
    24         # cleanup
    24         # cleanup
    25         debug "  no-op"
    25         debug "  no-op"
    26 
    26 
    27         cmd rm "$tmp"
    27         cmd rm "$tmp"
    28     else
    28     else
    29         # commit
    29         # commit
    30         debug "  deploy"
    30         debug "  apply"
    31 
    31 
    32         cmd mv "$tmp" "$out"
    32         cmd mv "$tmp" "$out"
    33     fi
    33     fi
    34 }
    34 }
    35 
    35