summary refs log tree commit diff
path: root/pkgs/development/compilers/jdk/ibm-builder.sh
blob: 2ff3a71322a62adc5efaa121290e43afbb0f0edb (plain) (blame)
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
source $stdenv/setup

if ! test -e "$pathname"; then
    echo ""
    echo "SORRY!"
    echo "You should download \`$(basename $pathname)' from IBM and place it in $(dirname $pathname)."
    echo "Blame IBM, not us."
    echo ""
    exit 1
fi

actual=$(md5sum -b $pathname | cut -c1-32)
if test "$actual" != "$md5"; then
    echo "hash is $actual, expected $md5"
    exit 1
fi

tar zxf $pathname || true

mkdir -p $out
mv $dirname/* $out/

# Remove crap in the root directory.
for file in $out/*
do
  if test -f $file ; then
    rm $file
  fi
done