| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | |
| 3 | if [scip-shell system . . `[`. ! -e src ]; then echoscip-shell system . . echo. "Not in source directory"; exit 1; fi |
| 4 | if [scip-shell system . . `[`. -e output ]; then rmscip-shell system . . rm. -r output; fi |
| 5 | if [scip-shell system . . `[`. -e '/tmp/eartagscip-shell filesystem . . `/tmp/eartag`.' ]; then rmscip-shell system . . rm. -r '/tmp/eartagscip-shell filesystem . . `/tmp/eartag`.'; fi |
| 6 | |
| 7 | set -e |
| 8 | mesonscip-shell system . . meson. setup --prefix=/tmp/eartag -Ddevel=true . output |
| 9 | mesonscip-shell system . . meson. compile -C output |
| 10 | mesonscip-shell system . . meson. install -C output |
| 11 | set +e |
| 12 | |
| 13 | #GSETTINGS_SCHEMA_DIR=/tmp/eartag/share/glib-2.0/schemas /tmp/eartag/bin/eartag-devel "$@" |
| 14 | ret=$? |
| 15 | |
| 16 | if [scip-shell system . . `[`. "$1" = "memray" ]; then |
| 17 | shift |
| 18 | [scip-shell system . . `[`. -e memray-eartag.bin ] && rmscip-shell system . . rm. memray-eartag.bin |
| 19 | [scip-shell system . . `[`. -e memray-flamegraph-eartag.html ] && rmscip-shell system . . rm. memray-flamegraph-eartag.html |
| 20 | GSETTINGS_SCHEMA_DIR=/tmp/eartag/share/glib-2.0/schemasscip-shell filesystem . . `/tmp/eartag/share/glib-2.0/schemas`. memray run --live /tmp/eartag/bin/eartag-develscip-shell filesystem . . `/tmp/eartag/bin/eartag-devel`. "$@" |
| 21 | ret=$? |
| 22 | elif [scip-shell system . . `[`. "$1" = "memray-flamegraph" ]; then |
| 23 | shift |
| 24 | [scip-shell system . . `[`. -e memray-eartag.bin ] && rmscip-shell system . . rm. memray-eartag.bin |
| 25 | [scip-shell system . . `[`. -e memray-flamegraph-eartag.html ] && rmscip-shell system . . rm. memray-flamegraph-eartag.html |
| 26 | GSETTINGS_SCHEMA_DIR=/tmp/eartag/share/glib-2.0/schemasscip-shell filesystem . . `/tmp/eartag/share/glib-2.0/schemas`. memray run -o memray-eartag.bin /tmp/eartag/bin/eartag-develscip-shell filesystem . . `/tmp/eartag/bin/eartag-devel`. "$@" |
| 27 | ret=$? |
| 28 | memray flamegraph memray-eartag.bin |
| 29 | xdg-open memray-flamegraph-eartag.html |
| 30 | elif [scip-shell system . . `[`. "$1" = "profiler" ]; then |
| 31 | shift |
| 32 | GSETTINGS_SCHEMA_DIR=/tmp/eartag/share/glib-2.0/schemasscip-shell filesystem . . `/tmp/eartag/share/glib-2.0/schemas`. pyinstrument -r html /tmp/eartag/bin/eartag-develscip-shell filesystem . . `/tmp/eartag/bin/eartag-devel`. "$@" |
| 33 | ret=$? |
| 34 | else |
| 35 | GSETTINGS_SCHEMA_DIR=/tmp/eartag/share/glib-2.0/schemasscip-shell filesystem . . `/tmp/eartag/share/glib-2.0/schemas`. /tmp/eartag/bin/eartag-develscip-shell filesystem . . `/tmp/eartag/bin/eartag-devel`. "$@" |
| 36 | ret=$? |
| 37 | fi |
| 38 | |
| 39 | exit $ret |