Changeset 361 for trunk


Ignore:
Timestamp:
Nov 4, 2017, 5:37:07 PM (6 years ago)
Author:
g7moreau
Message:
  • Don't rebuild graph if no update dot file
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/push-web

    r359 r361  
    4141
    4242
    43 klask exportsw --format dot --modulo ${GRAPH_MODULO} --shift ${GRAPH_SHIFT} > ${TMP}/switch-map.txt
     43klask exportsw --format dot --modulo ${GRAPH_MODULO} --shift ${GRAPH_SHIFT} > ${TMP}/switch-map.txt.new
    4444
    4545
     
    170170END
    171171
     172cmp --silent ${TMP}/switch-map.txt.new ${TMP}/switch-map.txt || mv -f ${TMP}/switch-map.txt.new ${TMP}/switch-map.txt
    172173
    173174if [ "${REMOTE_SERVER}" = "localhost" ]
     
    181182      ${REMOTE_FOLDER}/
    182183
    183    [ -x ${DOT} ] && (cd ${REMOTE_FOLDER}; ${DOT} -T svg switch-map.txt > switch-map.svg; ${DOT} -T png switch-map.txt > switch-map.png)
     184   [ -x ${DOT} ] && (cd ${REMOTE_FOLDER};
     185      [ switch-map.txt -nt switch-map.svg ] && ${DOT} -T svg switch-map.txt > switch-map.svg;
     186      [ switch-map.txt -nt switch-map.png ] && ${DOT} -T png switch-map.txt > switch-map.png)
    184187
    185188else
     
    193196
    194197
    195    ssh ${REMOTE_USER}@${REMOTE_SERVER} "(cd ${REMOTE_FOLDER}; ${DOT} -T svg switch-map.txt > switch-map.svg; ${DOT} -T png switch-map.txt > switch-map.png)"
     198   ssh ${REMOTE_USER}@${REMOTE_SERVER} "(cd ${REMOTE_FOLDER};
     199      [ switch-map.txt -nt switch-map.svg ] && ${DOT} -T svg switch-map.txt > switch-map.svg;
     200      [ switch-map.txt -nt switch-map.png ] && ${DOT} -T png switch-map.txt > switch-map.png)"
    196201fi
Note: See TracChangeset for help on using the changeset viewer.