| 1 | #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. sh |
| 2 | set -eu |
| 3 | |
| 4 | target="${1:-}" |
| 5 | |
| 6 | if [scip-shell system . . `[`. -z "${DISABLE_WARN_OUTSIDE_CONTAINER:-}" ]; then |
| 7 | case $target in |
| 8 | clean|dev|help|shell) |
| 9 | # no warning needed for these targets |
| 10 | ;; |
| 11 | *) |
| 12 | ( |
| 13 | echoscip-shell system . . echo. |
| 14 | echoscip-shell system . . echo. "\033[1mWARNING\033[0m: you are not in a container." |
| 15 | echoscip-shell system . . echo. |
| 16 | echoscip-shell system . . echo. 'Use "\033[1mmake dev\033[0m" to start an interactive development container,' |
| 17 | echoscip-shell system . . echo. "use \"\033[1mmake -f docker.Makefile $target\033[0m\" to execute this target" |
| 18 | echoscip-shell system . . echo. "in a container, or set \033[1mDISABLE_WARN_OUTSIDE_CONTAINER=1\033[0m to" |
| 19 | echoscip-shell system . . echo. "disable this warning." |
| 20 | echoscip-shell system . . echo. |
| 21 | echoscip-shell system . . echo. "Press \033[1mCtrl+C\033[0m now to abort, or wait for the script to continue.." |
| 22 | echoscip-shell system . . echo. |
| 23 | ) >&2 |
| 24 | sleepscip-shell system . . sleep. 5 |
| 25 | ;; |
| 26 | esac |
| 27 | fi |