Changeset 4226 for trunk/xml/lgt2html.sh
- Timestamp:
- 04/25/08 16:26:46 (7 months ago)
- Files:
-
- 1 modified
-
trunk/xml/lgt2html.sh (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/xml/lgt2html.sh
r4102 r4226 1 #!/bin/ bash1 #!/bin/sh 2 2 3 3 ## ================================================================ … … 154 154 done 155 155 156 if [[ "$f_arg" != "" && "$f_arg" != "xhtml" && "$f_arg" != "html" ]] 157 then 156 if [ "$f_arg" != "" ] && [ "$f_arg" != "xhtml" ] && [ "$f_arg" != "html" ] ; then 158 157 echo "Error! Unsupported output format: $f_arg" 159 158 usage_help 160 159 exit 1 161 elif [ "$f_arg" != "" ] 162 then 160 elif [ "$f_arg" != "" ] ; then 163 161 format=$f_arg 164 162 fi 165 163 166 if [[ "$d_arg" != "" && ! -d "$d_arg" ]] 167 then 164 if [ "$d_arg" != "" ] && [ ! -d "$d_arg" ] ; then 168 165 echo "Error! directory does not exists: $d_arg" 169 166 usage_help 170 167 exit 1 171 elif [ "$d_arg" != "" ] 172 then 168 elif [ "$d_arg" != "" ] ; then 173 169 directory=$d_arg 174 170 fi 175 171 176 if [[ "$i_arg" != "" ]] 177 then 172 if [ "$i_arg" != "" ] ; then 178 173 index_file=$i_arg 179 174 fi 180 175 181 if [[ "$t_arg" != "" ]] 182 then 176 if [ "$t_arg" != "" ] ; then 183 177 index_title=$t_arg 184 178 fi 185 179 186 if [[ "$p_arg" != "" && "$p_arg" != "xsltproc" && "$p_arg" != "xalan" && "$p_arg" != "sabcmd" ]] 187 then 180 if [ "$p_arg" != "" ] && [ "$p_arg" != "xsltproc" ] && [ "$p_arg" != "xalan" ] && [ "$p_arg" != "sabcmd" ] ; then 188 181 echo "Error! Unsupported XSLT processor: $p_arg" 189 182 usage_help 190 183 exit 1 191 elif [ "$p_arg" != "" ] 192 then 184 elif [ "$p_arg" != "" ] ; then 193 185 processor=$p_arg 194 186 fi 195 187 196 if [ "$format" = "xhtml" ] 197 then 188 if [ "$format" = "xhtml" ] ; then 198 189 xslt=$xhtml_xslt 199 190 else … … 201 192 fi 202 193 203 if ! [[ -a "./logtalk.dtd" ]] 204 then 194 if ! [ -e "./logtalk.dtd" ] ; then 205 195 cp "$LOGTALKHOME"/xml/logtalk.dtd . 206 196 fi 207 197 208 if ! [[ -a "./custom.ent" ]] 209 then 198 if ! [ -e "./custom.ent" ] ; then 210 199 cp "$LOGTALKUSER"/xml/custom.ent . 211 200 fi 212 201 213 if ! [[ -a "./logtalk.xsd" ]] 214 then 202 if ! [ -e "./logtalk.xsd" ] ; then 215 203 cp "$LOGTALKHOME"/xml/logtalk.xsd . 216 204 fi 217 205 218 if ! [[ -a "$directory/logtalk.css" ]] 219 then 206 if ! [ -e "$directory/logtalk.css" ] ; then 220 207 cp "$LOGTALKUSER"/xml/logtalk.css "$directory" 221 208 fi 222 209 223 if [[ `(ls *.xml | wc -l) 2> /dev/null` -gt 0 ]] 224 then 210 if [ `(ls *.xml | wc -l) 2> /dev/null` -gt 0 ] ; then 225 211 echo 226 212 echo "converting XML files..."
