Changeset 146 for trunk/insertphp.sh


Ignore:
Timestamp:
02/27/12 17:50:53 (12 years ago)
Author:
pinsard
Message:

xmlstarlet vs xml

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/insertphp.sh

    r116 r146  
    1818# 
    1919#  $ insertphp.sh -i filein -o fileout -s sedfile -d depth 
    20 # 
    2120# 
    2221# DESCRIPTION 
     
    5453# $Id$ 
    5554# 
     55# - fplod 20120227 
     56# 
     57#   * xmlstarlet vs xml 
     58# 
    5659# - fplod 2008-09-18T08:55:50Z aedon.locean-ipsl.upmc.fr (Darwin) 
    5760# 
     
    6972   AIX|IRIX64) 
    7073      echo " www : no specific posix checking" 
     74      xmlcmd=xml 
     75   ;; 
     76   Darwin) 
     77      xmlcmd=xmlstarlet 
    7178   ;; 
    7279   *) 
    7380     set -o posix 
     81     xmlcmd=xml 
    7482   ;; 
    7583esac 
     
    8391# 
    8492# test if xml is available 
    85 tool=xml 
     93tool=${xmlcmd} 
    8694type ${tool} 1> /dev/null 2>&1 
    8795status=${?} 
     
    167175# 
    168176# get title from main.xml 
    169 title=$(xml sel -N d="http://docbook.org/ns/docbook" -t -m "/d:article/d:title/node()" -c . main.xml) 
     177title=$(${xmlcmd} sel -N d="http://docbook.org/ns/docbook" -t -m "/d:article/d:title/node()" -c . main.xml) 
    170178# 
    171179dirphp="./" 
Note: See TracChangeset for help on using the changeset viewer.