build_dist.sh 668 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
#!/usr/bin/env bash

USER=$(whoami)
IP="localhost"
PREFIX=$(pwd)
DIR="bpm-sw-deploy"
DIST_NAME="bpm-sw"
DEFAULT_BOARD="afcv3"
VALID_BOARDS_STR="Valid values are: \"ml605\" and \"afcv3\"."

# Select board in which we will work. Options are: ml605 or afcv3
BOARD_TYPE=$1

if [ -z "$BOARD_TYPE" ]; then
    echo "\"BOARD_TYPE\" variable unset. "$VALID_BOARDS_STR
    exit 1
fi

if [ "$BOARD_TYPE" != "afcv3" ] && [ "$BOARD_TYPE" != "ml605" ]; then
    echo "Unsupported board. "$VALID_BOARDS_STR
    exit 1
fi

./deploy.sh ${USER} ${IP} ${PREFIX}/${DIR}
25
makeself --bzip2  ${PREFIX}/${DIR} ${DIST_NAME}.bz2.run "LNLS BPM Software Package" \
26
    ./compile.sh ${BOARD_TYPE}