mirror of
https://github.com/clearlinux/graphene.git
synced 2026-09-04 04:41:37 +00:00
Previously, some GSC templates and scripts that execute inside Docker containers contained relative file paths. This led to failures if a base Docker image contained WORKDIR different from root (`/`), since all GSC scripts put Graphene-related files under root dir. Signed-off-by: Dmitrii Kuvaiskii <dmitrii.kuvaiskii@intel.com>
14 lines
508 B
Bash
14 lines
508 B
Bash
#!/usr/bin/env bash
|
|
|
|
set -ex
|
|
|
|
# Set default PAL to Linux-SGX
|
|
if [ -z "$GSC_PAL" ] || [ "$GSC_PAL" == "Linux-SGX" ]
|
|
then
|
|
GSC_PAL=Linux-SGX
|
|
/graphene/python/graphene-sgx-get-token -output /entrypoint.token -sig /entrypoint.sig
|
|
/graphene/Runtime/pal-$GSC_PAL /graphene/Runtime/libpal-$GSC_PAL.so init /entrypoint {% if insecure_args %}{{binary_arguments}} "${@}"{% endif %}
|
|
else
|
|
/graphene/Runtime/pal-$GSC_PAL /graphene/Runtime/libpal-$GSC_PAL.so init /entrypoint {{binary_arguments}} "${@}"
|
|
fi
|