File: build.sh

package info (click to toggle)
bnd 5.0.1-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 44,128 kB
  • sloc: java: 249,039; xml: 90,728; sh: 655; perl: 153; makefile: 96; python: 47; javascript: 9
file content (31 lines) | stat: -rwxr-xr-x 924 bytes parent folder | download | duplicates (2)
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
31
#!/bin/bash
set -e

# Edit these properties when moving to a new version.
VERSION=4.1.0
# SHA-256...
SHA=5ad18a5a8702fcfe42d5180ee4ba33cf4728d5f68055b2d3755a86222afac462

mkdir -p tmp
if [ ! -f tmp/bnd.jar ]; then
	echo Downloading bnd JAR version $VERSION
	curl https://search.maven.org/remotecontent?filepath=biz/aQute/bnd/biz.aQute.bnd/$VERSION/biz.aQute.bnd-$VERSION.jar > tmp/bnd.jar
else
	echo Already downloaded bnd JAR version $VERSION. If SHA check fails, try deleting tmp folder.
fi

echo Checking SHA...
echo "$SHA  tmp/bnd.jar" > tmp/checksum

# install shasum
# yum install -y perl-Digest-SHA
# dnf install perl-Digest-SHA

shasum -a 256 -c tmp/checksum

echo Building Docker image
docker build --quiet -t bndtoolsorg/bnd:$VERSION -t bndtoolsorg/bnd:latest .

echo DONE! Try the following:
echo alias bnd-docker=\''docker run -it -v $HOME:$HOME -v $(pwd):/data' bndtoolsorg/bnd:latest\'
echo bnd-docker version