2020-06-17 18:16:00 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -o noglob
|
|
|
|
set -o errexit
|
|
|
|
set -o nounset
|
|
|
|
IFS='
|
|
|
|
'
|
|
|
|
|
|
|
|
mkdir student
|
|
|
|
cd student
|
|
|
|
|
|
|
|
if test "$REPOSITORY"; then
|
|
|
|
password=$(cat)
|
2020-06-20 14:43:32 +00:00
|
|
|
git clone --quiet --depth=1 --shallow-submodules https://root:"${password}"@"$REPOSITORY" .
|
2020-06-17 18:16:00 +00:00
|
|
|
else
|
|
|
|
first_file=$(echo "$EXPECTED_FILES" | cut -d' ' -f1)
|
|
|
|
mkdir -p "$(dirname "$first_file")"
|
|
|
|
cat > "$first_file"
|
|
|
|
fi
|
|
|
|
|
2020-06-17 19:40:56 +00:00
|
|
|
cd /app
|
|
|
|
node --no-warnings --unhandled-rejections=strict test.js "${EXERCISE}"
|