aboutsummaryrefslogtreecommitdiffstats
path: root/generasitio.sh
diff options
context:
space:
mode:
authorsejo <sejo@texto-plano.xyz>2021-05-29 11:54:43 -0500
committersejo <sejo@texto-plano.xyz>2021-05-29 11:54:43 -0500
commit8ffee12f12a8fda599614ac45be721c2c63c9b5f (patch)
tree61fd57a45688be277e1e210dc669d1e12b5441ef /generasitio.sh
parent49f513e696e9436b073b56b12e01b40007c70b0e (diff)
downloadsitio-8ffee12f12a8fda599614ac45be721c2c63c9b5f.tar.gz
contador en script, cambio a bash
Diffstat (limited to 'generasitio.sh')
-rwxr-xr-xgenerasitio.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/generasitio.sh b/generasitio.sh
index f36173e..f03943e 100755
--- a/generasitio.sh
+++ b/generasitio.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
mkdir -p web
mkdir -p gem
@@ -36,9 +36,11 @@ echo "revisando y convirtiendo archivimos gmo a html y gmi..."
orig=$(date +"%s" -d "1989-07-27")
+i=0
# convierte y actualiza archivos gmi a html
for f in $(find src/ -iname *.gmo)
do
+
path=${f#src/} # quita el prefijo de "src/"
htmlpath="web/${path%gmo}html" # agrega "web/" y cambia el sufijo
gempath="gem/${path%gmo}gmi" # agrega "gem/"
@@ -51,10 +53,15 @@ do
fecha=$(date -r $f --rfc-3339=date)
- echo "${f}"
+# echo "${f}"
# echo "${f} -> ${htmlpath}"
# echo "${f} -> ${gempath}"
# haz la conversión
awk -v fecha=$fecha -v fechasjm="$fechasjm" -f gemtext2html.awk $f > $htmlpath
awk -v fecha=$fecha -v fechasjm="$fechasjm" -f gem2gem.awk $f > $gempath
+
+ (( i++ ))
+
done
+
+echo "convertidas ${i} páginas!"
Un proyecto texto-plano.xyz