Skip to content

Commit d1f370d

Browse files
committed
replaced test .env with source .env and simplified dotenv handling in external.sh
1 parent 97090d6 commit d1f370d

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ Example `entrypoint.sh`:
5454
```bash
5555
#!/bin/bash
5656
set -euxo pipefail
57-
# shellcheck disable=SC2046
58-
test -f .env && export $(xargs < .env)
57+
source .env
5958

6059
# ...
6160
```

external.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ cp -R "${ARCHIVE_DIR}" .
2828
cp "${MAKESELF_BIN}" makeself.sh
2929
cp "${MAKESELF_HEADER_BIN}" makeself-header.sh
3030
chmod +x "$(basename "${ARCHIVE_DIR}")/${STARTUP_SCRIPT}"
31-
if [ -n "${DOTENV}" ]; then
32-
echo "${DOTENV}" > "$(basename "${ARCHIVE_DIR}")/.env"
33-
fi
31+
echo "${DOTENV}" > "$(basename "${ARCHIVE_DIR}")/.env"
3432

3533
RUN=( ./makeself.sh --nomd5 --nocrc --tar-extra '--mtime=2019-01-01' --packaging-date '1970-01-01T00:00:00Z' --base64 ${NEEDROOT} "$(basename "${ARCHIVE_DIR}")" "${FILE_NAME}" "${LABEL}" "./${STARTUP_SCRIPT}" )
3634
echo "${RUN[@]}" >run.log

0 commit comments

Comments
 (0)