Fork of daniellemaywood.uk/gleam — Wasm codegen work
2

Configure Feed

Select the types of activity you want to include in your feed.

gleam / compiler-cli / templates / erlang-shipment-entrypoint.sh
633 B 42 lines
1# SPDX-License-Identifier: Apache-2.0 2# SPDX-FileCopyrightText: 2022 The Gleam contributors 3 4#!/bin/sh 5set -eu 6 7PACKAGE=$PACKAGE_NAME_FROM_GLEAM 8BASE=$(dirname "$0") 9COMMAND="${1-default}" 10 11run() { 12 exec erl \ 13 -pa "$BASE"/*/ebin \ 14 -eval "$PACKAGE@@main:run($PACKAGE)" \ 15 -noshell \ 16 -extra "$@" 17} 18 19shell() { 20 erl -pa "$BASE"/*/ebin 21} 22 23case "$COMMAND" in 24run) 25 shift 26 run "$@" 27 ;; 28 29shell) 30 shell 31 ;; 32 33*) 34 echo "usage:" >&2 35 echo " entrypoint.sh \$COMMAND" >&2 36 echo "" >&2 37 echo "commands:" >&2 38 echo " run Run the project main function" >&2 39 echo " shell Run an Erlang shell" >&2 40 exit 1 41 ;; 42esac