34 lines
429 B
Bash
34 lines
429 B
Bash
|
|
#!/bin/sh
|
||
|
|
|
||
|
|
|
||
|
|
dependencies(){
|
||
|
|
apt update
|
||
|
|
apt install -y pandoc
|
||
|
|
}
|
||
|
|
|
||
|
|
convert_to_html(){
|
||
|
|
# NOTA: FICHEROS SIN ESPACIOS EN LOS NOMBRES
|
||
|
|
for MD in $(ls *.md)
|
||
|
|
do
|
||
|
|
pandoc -o $MD.html $MD
|
||
|
|
done
|
||
|
|
}
|
||
|
|
|
||
|
|
upload(){
|
||
|
|
for HTML in $(ls *.md)
|
||
|
|
do
|
||
|
|
echo "USAR scp O ftp O CUALQUIER OTRA COSA PARA SUBIR LOS HTML A UN APACHE: $HTML"
|
||
|
|
done
|
||
|
|
}
|
||
|
|
|
||
|
|
main(){
|
||
|
|
dependencies
|
||
|
|
convert_to_html
|
||
|
|
upload
|
||
|
|
}
|
||
|
|
|
||
|
|
main
|
||
|
|
|
||
|
|
|
||
|
|
|