Changeset 87 for trunk/klask-push-web


Ignore:
Timestamp:
Mar 30, 2011, 3:43:34 PM (14 years ago)
Author:
g7moreau
Message:
  • Change some test
  • Remote command dot in absolute
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/klask-push-web

    r85 r87  
    55# 2011/03/30 gabriel - make it generic
    66
    7 TMP='/tmp/klask-push-web'
    8 
    97SITE_NAME=''
    108REMOTE_SERVER=localhost
     
    1210REMOTE_FOLDER=/var/www/klask/
    1311
    14 if test -f /etc/klask/push-web.conf
     12if [ -f /etc/klask/push-web.conf ]
    1513then
    1614   . /etc/klask/push-web.conf
    1715fi
    1816
     17TMP='/tmp/klask-push-web'
    1918
     19
     20# local command
    2021MKDIR=/bin/mkdir
    2122DATE=/bin/date
     
    2829RSYNC=/usr/bin/rsync
    2930
     31# remote command
     32DOT=/usr/bin/dot
    3033
    31 $MKDIR -p $TMP
    32 if test ! -d ${TMP}
     34
     35$MKDIR -p ${TMP}
     36if [ ! -d ${TMP} ]
    3337then
    3438   echo "Error: Folder ${TMP} do not exist !"
     
    99103<head>
    100104 <link rel="stylesheet" type="text/css" href="style-klask.css" />
     105 <meta http-equiv="refresh" content="3600">
    101106 <script src="sorttable-klask.js"></script>
    102107</head>
     
    128133END
    129134
    130 if test ${REMOTE_SERVER} = 'localhost'
     135if [ ${REMOTE_SERVER} = 'localhost' ]
    131136then
    132137   $RSYNC \
     
    139144      ${REMOTE_FOLDER}/
    140145
    141    (cd ${REMOTE_FOLDER}; dot -T png switch-map.txt > switch-map.png)
     146   [ -x ${DOT} ] && (cd ${REMOTE_FOLDER}; ${DOT} -T png switch-map.txt > switch-map.png)
    142147
    143148else
     
    152157
    153158
    154    $SSH ${REMOTE_USER}@${REMOTE_SERVER} "(cd ${REMOTE_FOLDER}; dot -T png switch-map.txt > switch-map.png)"
     159   $SSH ${REMOTE_USER}@${REMOTE_SERVER} "(cd ${REMOTE_FOLDER}; ${DOT} -T png switch-map.txt > switch-map.png)"
    155160fi
Note: See TracChangeset for help on using the changeset viewer.