forked from dixudx/trac-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin_builder.sh
More file actions
29 lines (27 loc) · 922 Bytes
/
Copy pathplugin_builder.sh
File metadata and controls
29 lines (27 loc) · 922 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
#!/bin/bash
# This is a helper script. DO NOT RUN MANUALLY. It is NOT executable for a reason!
set -e
die() {
echo "$1"
exit 99
}
[ -n "$2" ] || die "Not enough arguments - DO NOT RUN MANUALLY! This is used inside the container."
PLUGIN="$1"
PLUGIN_VERSION="$2"
PLUGIN_URL="$3"
printf "\nBuilding Trac plugin ${PLUGIN} (${PLUGIN_VERSION})\n"
if [ -n "${PLUGIN_URL}" ]; then
true
# echo "Using forced URL: ${PLUGIN_URL}"
else
PLUGIN_URL="https://trac-hacks.org/browser/${PLUGIN}/${PLUGIN_VERSION}?format=zip"
# echo "Using generated URL: ${PLUGIN_URL}"
fi
mkdir /workspace-${PLUGIN}
cd /workspace-${PLUGIN}
wget --no-verbose --output-document=./${PLUGIN}.zip "${PLUGIN_URL}"
unzip -q ./${PLUGIN}.zip
cd $(basename ${PLUGIN_VERSION})
echo "Logging build to /workspace/eggs/logs/${PLUGIN}.log"
python2 ./setup.py bdist_egg > /workspace/eggs/logs/${PLUGIN}.log 2>&1
mv -v dist/*.egg /workspace/eggs/