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