Commit bc5bb173 by Jessica Hawkwell

This should finalize the build.

1 parent f5f3a2da
Pipeline #164 passed
in 1 minute 0 seconds
{ "insecure-registries": ["mc.felinewith.me:5000"] }
\ No newline at end of file
#! /bin/bash -eu
set -o pipefail
# Copy files from /usr/share/maven/ref into ${MAVEN_CONFIG}
# So the initial ~/.m2 is set with expected content.
# Don't override, as this is just a reference setup
copy_reference_file() {
local root="${1}"
local f="${2%/}"
local logfile="${3}"
local rel="${f/${root}/}" # path relative to /usr/share/maven/ref/
echo "$f" >> "$logfile"
echo " $f -> $rel" >> "$logfile"
if [[ ! -e ${MAVEN_CONFIG}/${rel} || $f = *.override ]]
then
echo "copy $rel to ${MAVEN_CONFIG}" >> "$logfile"
mkdir -p "${MAVEN_CONFIG}/$(dirname "${rel}")"
cp -r "${f}" "${MAVEN_CONFIG}/${rel}";
fi;
}
copy_reference_files() {
local log="$MAVEN_CONFIG/copy_reference_file.log"
if (touch "${log}" > /dev/null 2>&1)
then
echo "--- Copying files at $(date)" >> "$log"
find /usr/share/maven/ref/ -type f -exec bash -eu -c 'copy_reference_file /usr/share/maven/ref/ "$1" "$2"' _ {} "$log" \;
else
echo "Can not write to ${log}. Wrong volume permissions? Carrying on ..."
fi
}
export -f copy_reference_file
copy_reference_files
exec "$@"
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>/usr/share/maven/ref/repository</localRepository>
</settings>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!