add and document more build options
Iris Lightshard nilix@nilfm.cc
PGP Signature
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEkFh6dA+k/6CXFXU4O3+8IhROY5gFAmKutg8ACgkQO3+8IhRO Y5iEBhAAkpuuCHvIZQSDRRo+gO2BHZH0fzqDGL4NiDZtbNxJ2/hdhnTf+KoFb5aP BG0JejHgFjtnjJfkefPBUaA5GTrdg3n2D+7zOMfXG4PYdrGiF8rd444yMHGMb0Cs 6tFMax0gFIaV4TDyymcm3n9Exuk7tKOjOMMg7Z89qP777dKcjuDpqPQhj1+nirrM CZoH1AmuGfuDPtn3fhJtlqsmcyUh9KHcz+XIBtg4AwAhS4sRd1z5g813izj+B916 CPXrohUz8xsV9BOus/tt/DTji952UidJaiODYTYVkzdo7d6kI/5vxHCV0JNzDjEx cNXkjkq0ky6ErY/rmNTE2wpMcLxrqbWQvI0VC1nD4J4aATxVWywhbqB7SAAZWKSw 4B9sLO9sHWOibeiw15qpJm/KbPavIwoFAGyo7bTVpdf2K0S0wCb/iLMjQeXfs1cj 6FuitX943ISzJagXqlO6N+Vowu/S42L7X4L3RxteT9VE8iYAh/mG0I4YR2HLKIwZ eEYbILHhG1u1q38cVKcQ/sAUdCON3mW6fJT6sfE/G7Nv5bz8+yFDgW7/40vwqcd/ qB2HnYVI65EABxfmEABDomj2jvpDYCtR2vNpDj4vDNcEYEKsy+KOm4biFCYgMLfB SfIfFhYgd6Tw19UNhuVgmRapKiHMNgR6RD4pVKbeZ7JHgmGwRGU= =Ga8p -----END PGP SIGNATURE-----
M
README.md
→
README.md
@@ -18,6 +18,20 @@ 5. Create a new page, eg `inc/my_first_page.htm` (see the markup section below).
6. Edit your `inc/meta.nav.htm` again to reference your new page. 7. Run `./build.sh` again! You will be warned of any orphaned files. +## build options + +Currently these build options are supported, and they must be supplied __in this order__ if used together: +- `-r`: Regenerate all thumbnails +- `-d`: Delete the latest twtxt entry; if used together with `-t`, the new entry replaces the old one +- `-t`: Add the next arg (quoted string) as a twtxt entry + +Combined argument format like `./build.sh -rdt "twt stuff"` is not supported. Use this format instead: +``` +./build.sh -r -d -t "twt stuff" +``` + +## debugging + If you run into issues with your markup crashing `eureka`, edit the `build.sh` file to uncomment the linux debug build line and comment the fast build; this will show you a stack trace of where you are running into buffer overflows, and give you a hint of where your markup is messed up. To see the individual file that has the error, also uncomment the line in `fpinject()` that prints the file names. # markup
M
build.sh
→
build.sh
@@ -41,14 +41,32 @@ # Build Size
# echo "$(du -b ./main | cut -f1) bytes written" # Run +if [ "$1" = "-r" ]; then + regen="true" + shift +fi +if [ "$1" = "-d" ]; then + shift + tmptwtxt=$(mktemp) + tail -n +2 ../www/twtxt.txt > ${tmptwtxt} + cp ${tmptwtxt} ../www/twtxt.txt + rm ${tmptwtxt} + echo "Deleted latest twtxt" +fi if [ "$1" = "-t" ]; then shift && ./tw.sh $@ + echo "Twtxt added" fi ./main exitstatus=$? if [ "${exitstatus}" = "0" ]; then - echo "Generating thumbnails in the background" - (./thumbnailer.sh build > /dev/null 2>&1) & + if [ "${regen}" = "true" ]; then + echo "Clearing thumbnails and regenerating in the background" + (./thumbnailer.sh clean > /dev/null 2>&1; ./thumbnailer.sh build > /dev/null 2>&1) & + else + echo "Generating thumbnails in the background" + (./thumbnailer.sh build > /dev/null 2>&1) & + fi fi # Cleanup