blob: d05c8de97426c7c0721bdbf7c4442a96590388b0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/sh
# creates a $1_xhtml dir and that's your root
cd "${1}" || exit
capsule_dir="${PWD}"
printf "Making required dirs..."
for subdir in $(find * -type d); do
mkdir -p "../${1}_xhtml/${subdir}"
done
printf "done\n"
printf "Converting gmi->html..."
for file in $(find * | grep ".gmi" | sed 's/.gmi//'); do
../g2x < "./${file}.gmi" > "../${1}_xhtml/${file}.html"
done
printf "done\n"
printf "Linking non gmi files..."
for file in $(find * -type f | grep -v ".gmi"); do
ln -sf "${PWD}/${file}" "../${1}_xhtml/${file}"
done
printf "done\n"
|