Subversion Repositories svn.mios32

Rev

Rev 2141 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2141 Sauraen 1
# $Id: release.sh 1944 2014-01-28 21:24:35Z tk $
2
 
3
if [[ "$1" == "" ]]; then
4
  echo "SYNTAX: release.sh <release-directory>"
5
  exit 1
6
fi
7
 
8
RELEASE_DIR=$1
9
 
10
if [[ -e $RELEASE_DIR ]]; then
11
  echo "ERROR: the release directory '$RELEASE_DIR' already exists!"
12
  exit 1
13
fi
14
 
15
###############################################################################
16
echo "Creating $RELEASE_DIR"
17
 
18
mkdir $RELEASE_DIR
19
cp README.txt $RELEASE_DIR
20
cp CHANGELOG.txt $RELEASE_DIR
21
cp -r cfg $RELEASE_DIR
22
cp -r touchosc $RELEASE_DIR
23
find $RELEASE_DIR/cfg -type d | grep .svn$ | xargs rm -rf
24
 
25
###############################################################################
2427 tk 26
configs=( stm32f1 lpc17 stm32f4 )
27
for i in "${configs[@]}"; do
28
  echo "Building for $i"
29
  source ../../../../source_me_${i}
30
  make cleanall
31
  mkdir -p $RELEASE_DIR/$MIOS32_BOARD
32
  make > $RELEASE_DIR/$MIOS32_BOARD/log.txt || exit 1
33
  cp project.hex $RELEASE_DIR/$MIOS32_BOARD
34
done
2141 Sauraen 35
 
36
###############################################################################
37
make cleanall
38
echo "Done!"