-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·30 lines (24 loc) · 850 Bytes
/
Copy pathbuild.sh
File metadata and controls
executable file
·30 lines (24 loc) · 850 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
set -o errexit
set -o nounset
[[ ${DEBUG-} =~ ^1|yes|true$ ]] && set -o xtrace
readonly SCRIPT_PATH="$(readlink --canonicalize "${0}")"
readonly SCRIPT_NAME="$(basename "${SCRIPT_PATH}")"
readonly SCRIPT_DIRECTORY_PATH="$(dirname "${SCRIPT_PATH}")"
readonly DOCKER_OUTPUT_PATH="${SCRIPT_DIRECTORY_PATH}/docker-out"
readonly TARGET_OUTPUT_PATH="/my-other-project-using-these-artifacts/sqlite-artifacts"
cd "$SCRIPT_DIRECTORY_PATH" \
|| { echo "'$SCRIPT_NAME' could not change to directory '$SCRIPT_DIRECTORY_PATH'"; exit 1; }
docker \
build \
--progress=plain \
--no-cache=false \
--output type=local,dest="$DOCKER_OUTPUT_PATH" \
. \
&& cp \
--verbose \
"${DOCKER_OUTPUT_PATH}/output/"* \
"$TARGET_OUTPUT_PATH"/
md5sum "$TARGET_OUTPUT_PATH"/*
md5sum "$DOCKER_OUTPUT_PATH"/output/*
file "$DOCKER_OUTPUT_PATH"/output/*