#!/bin/sh echo "revisando y copiando imágenes..." for f in $(find src/ -regextype awk -regex ".*(jpg|png|gif)") do path="web/${f#src/}" # quita el prefijo de src/ y agrega web/ mkdir -p $(dirname $path) # crea directorio si no existe cp -vu $f $path done echo "revisando y convirtiendo archivimos gmi a html..." # convierte y actualiza archivos gmi a html for f in $(find src/ -iname *.gmi) do path=${f#src/} # quita el prefijo de "src/" htmlpath="web/${path%gmi}html" # agrega "web/" y cambia el sufijo gempath="gem/${path}" # agrega "gem/" # if [ $f -nt $htmlpath ] # si archivo gmi es "newer than" el html # then echo "${f} -> ${htmlpath}" echo "${f} -> ${gempath}" # mkdir -p $(dirname $htmlpath) # crea el directorio si no existe # mkdir -p $(dirname $htmlpath) # crea el directorio si no existe # haz la conversión awk -f gemtext2html.awk $f > $htmlpath awk -f gem2gem.awk $f > $gempath # fi done