mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-01-16 13:50:23 +01:00
Make opening of MD files after docs gen be optional.
This commit is contained in:
parent
09173f6a6f
commit
6f8d47e2a4
@ -3,10 +3,12 @@
|
||||
FORCED=""
|
||||
IMGGEN=""
|
||||
FILES=""
|
||||
DISPMD=""
|
||||
for opt in "$@" ; do
|
||||
case $opt in
|
||||
-f ) FORCED=$opt ;;
|
||||
-i ) IMGGEN=$opt ;;
|
||||
-d ) DISPMD=$opt ;;
|
||||
* ) FILES="$FILES $opt" ;;
|
||||
esac
|
||||
done
|
||||
@ -29,12 +31,14 @@ rm -f tmpscad*.scad
|
||||
for lib in $PREVIEW_LIBS; do
|
||||
lib="$(basename $lib .scad)"
|
||||
mkdir -p images/$lib
|
||||
if [ "$IMGGEN" = "-i" ]; then
|
||||
if [ "$IMGGEN" != "" ]; then
|
||||
rm -f images/$lib/*.png images/$lib/*.gif
|
||||
fi
|
||||
echo "$lib.scad"
|
||||
../scripts/docs_gen.py ../$lib.scad -o $lib.scad.md -c $IMGGEN $FORCED -I images/$lib/ || exit 1
|
||||
open -a Typora $lib.scad.md
|
||||
if [ "$DISPMD" != "" ]; then
|
||||
open -a Typora $lib.scad.md
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user