Changeset 410 for trunk/push-web
- Timestamp:
- Jan 27, 2020, 2:25:56 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/push-web
r408 r410 48 48 49 49 klask exportsw --format dot --modulo ${GRAPH_MODULO} --shift ${GRAPH_SHIFT} > ${TMP}/switch-map.txt.new 50 50 klask exportsw > ${TMP}/switch-db.txt.new 51 51 52 52 klask exportdb > ${TMP}/hostname-db.txt 53 klask exportsw > ${TMP}/switch-db.txt54 53 klask ip-free > ${TMP}/ipfree-db.txt 55 54 klask bad-vlan-id > ${TMP}/badvlan-db.txt 56 55 56 cmp --silent ${TMP}/switch-db.txt.new ${TMP}/switch-db.txt || { 57 mv -f ${TMP}/switch-db.txt.new ${TMP}/switch-db.${TIMEFILE}.txt; 58 ln -sf ${TMP}/switch-db.${TIMEFILE}.txt ${TMP}/switch-db.txt 59 } 60 61 cmp --silent ${TMP}/switch-map.txt.new ${TMP}/switch-map.txt || { 62 mv -f ${TMP}/switch-map.txt.new ${TMP}/switch-map.${TIMEFILE}.txt; 63 ln -sf ${TMP}/switch-map.${TIMEFILE}.txt ${TMP}/switch-map.txt 64 } 65 66 old_switch_db=$((echo 'command <tt>klask exportsw --format txt</tt>'; 67 (cd ${TMP}/; ls -1 switch-db.20[[0-9]][[0-9]]-[[0-9]][[0-9]]-[[0-9]][[0-9]].[[0-9]][[0-9]]-[[0-9]][[0-9]].txt;) \ 68 | sed -e 's/^switch-db\.//; s/\.txt$//;' \ 69 | xargs -r -I {} printf "<a href=\"switch-db.%s.txt\">%s</a>\n" '{}' '{}' \ 70 ) \ 71 | paste -sd ',' -) 72 73 old_switch_map=$((echo 'graphviz';\ 74 (cd ${TMP}/; ls -1 switch-map.20[[0-9]][[0-9]]-[[0-9]][[0-9]]-[[0-9]][[0-9]].[[0-9]][[0-9]]-[[0-9]][[0-9]].txt;) \ 75 | sed -e 's/^switch-map\.//; s/\.txt$//;' \ 76 | xargs -r -I {} printf "<a href=\"switch-map.%s.txt\">%s</a>\n" '{}' '{}' \ 77 )\ 78 | paste -sd ',' -) 57 79 58 80 cat <<END > ${TMP}/index.html … … 237 259 <ul> 238 260 <li><a href="hostname-db.txt">Computers DB</a> (command <tt>klask exportdb --format txt</tt>),</li> 239 <li><a href="switch-db.txt">Switches DB</a> ( command <tt>klask exportsw --format txt</tt>),</li>261 <li><a href="switch-db.txt">Switches DB</a> (${old_switch_db}),</li> 240 262 <li><a href="ipfree-db.txt">IP available</a> (command <tt>klask ip-free --format txt</tt>),</li> 241 263 <li><a href="badvlan-db.txt">VLAN mismatch</a> (command <tt>klask bad-vlan-id --format txt</tt>),</li> 242 <li>Map format: <a href="switch-map.txt">dot source</a> ( graphviz), <a href="switch-map.png">png</a>, <a href="switch-map.svg">svg</a>.</li>264 <li>Map format: <a href="switch-map.txt">dot source</a> (${old_switch_map}), <a href="switch-map.png">png</a>, <a href="switch-map.svg">svg</a>.</li> 243 265 </ul> 244 266 </p> … … 254 276 </html> 255 277 END 256 257 cmp --silent ${TMP}/switch-map.txt.new ${TMP}/switch-map.txt || {258 mv -f ${TMP}/switch-map.txt.new ${TMP}/switch-map.${TIMEFILE}.txt;259 ln -sf ${TMP}/switch-map.${TIMEFILE}.txt ${TMP}/switch-map.txt260 }261 278 262 279 if [ "${REMOTE_SERVER}" = "localhost" ] … … 269 286 ${TMP}/*-db.txt \ 270 287 ${TMP}/switch-map.txt \ 288 ${TMP}/*.20[[0-9]][[0-9]]-[[0-9]][[0-9]]-[[0-9]][[0-9]].[[0-9]][[0-9]]-[[0-9]][[0-9]].txt \ 271 289 ${REMOTE_FOLDER}/ 272 290 … … 283 301 ${TMP}/*-db.txt \ 284 302 ${TMP}/switch-map.txt \ 303 ${TMP}/*.20[[0-9]][[0-9]]-[[0-9]][[0-9]]-[[0-9]][[0-9]].[[0-9]][[0-9]]-[[0-9]][[0-9]].txt \ 285 304 ${REMOTE_USER}@${REMOTE_SERVER}:${REMOTE_FOLDER}/ 286 305
Note: See TracChangeset
for help on using the changeset viewer.