11107
|
1 |
#!/bin/bash
|
|
2 |
|
|
3 |
THIS="$(cd "$(dirname "$0")"; echo "$PWD")"
|
|
4 |
SUPER="$(cd "$THIS"; cd ..; echo "$PWD")"
|
|
5 |
NAME="$(basename "$THIS")"
|
|
6 |
|
|
7 |
TAR=tar
|
|
8 |
type -path gtar >/dev/null && TAR=gtar
|
|
9 |
|
|
10 |
cd "$SUPER"
|
|
11 |
mkdir -p "$NAME/dist"
|
|
12 |
|
|
13 |
|
|
14 |
echo "*** ${NAME}_base.tar.gz"
|
|
15 |
"$TAR" czf "$NAME/dist/${NAME}_base.tar.gz" polyml "$NAME/LICENCE" "$NAME/bin"
|
|
16 |
ln -sf "${NAME}_base.tar.gz" "$NAME/dist/polyml_base.tar.gz"
|
|
17 |
|
|
18 |
for PLATFORM in sparc-solaris x86-linux
|
|
19 |
do
|
|
20 |
echo "*** ${NAME}_${PLATFORM}.tar.gz"
|
|
21 |
"$TAR" czf "$NAME/dist/${NAME}_${PLATFORM}.tar.gz" "$NAME/$PLATFORM"
|
|
22 |
ln -sf "${NAME}_${PLATFORM}.tar.gz" "$NAME/dist/polyml_${PLATFORM}.tar.gz"
|
|
23 |
done
|