File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 5555 done
5656fi
5757
58- if [ " ${CONTAINER_TYPE} " != " docker" -a " ${CONTAINER_TYPE} " != " singularity" ]; then
58+ if [ " ${CONTAINER_TYPE} " != " docker" -a " ${CONTAINER_TYPE} " != " singularity" -a " ${CONTAINER_TYPE} " != " devcontainer " ]; then
5959 echo " BAD CONTAINER TYPE: ${CONTAINER_TYPE} "
60+ exit 1
6061fi
6162
6263if [ ! -f ${ROOT} /.container-type ]; then
6667print_env () {
6768 if [ " ${CONTAINER_TYPE} " == " docker" ]; then
6869 echo " Using Docker environment"
69- else
70+ elif [ " ${CONTAINER_TYPE} " == " singularity " ] ; then
7071 echo " Using Singularity environment"
72+ elif [ " ${CONTAINER_TYPE} " == " devcontainer" ]; then
73+ echo " Using devcontainer environment"
74+ else
75+ echo " Unknown container type of ${CONTAINER_TYPE} "
76+ exit 1
7177 fi
7278}
7379
@@ -90,7 +96,7 @@ elif [ "${CONTAINER_TYPE}" == "docker" ]; then
9096 DOCKER_BASE=" docker run -v $( ROOT) :$( ROOT) -w $( ROOT) riscvintl/udb:${CONTAINER_TAG} "
9197 fi
9298 RUN=" ${DOCKER_BASE} "
93- else
99+ elif [ " ${CONTAINER_TYPE} " == " singularity " ] ; then
94100 print_env
95101 CONTAINER_PATH=${ROOT} /.singularity/image-$CONTAINER_TAG .sif
96102 HOME_PATH=${HOME}
@@ -103,6 +109,11 @@ else
103109 fi
104110 singularity pull ${SINGULARITY_CACHE} ${CONTAINER_PATH} oras://docker.io/riscvintl/spec-generator:$CONTAINER_TAG
105111 fi
112+ elif [ " ${CONTAINER_TYPE} " == " devcontainer" ]; then
113+ print_env
114+ else
115+ echo " Unknown container type of ${CONTAINER_TYPE} "
116+ exit 1
106117fi
107118
108119if [ -f $ROOT /.git ]; then
You can’t perform that action at this time.
0 commit comments