2009-05-31 17:53:33 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
#REVISION=`head -c 4 ../../todo.txt`
|
|
|
|
REVISION=`head -1 ../../todo.txt | awk '{print $1}'`
|
|
|
|
|
|
|
|
if [ $1 ]
|
|
|
|
then
|
|
|
|
RELEASE=$1
|
2009-08-03 22:57:46 +02:00
|
|
|
echo Creating Arduino release $RELEASE...
|
2009-05-31 17:53:33 +02:00
|
|
|
else
|
|
|
|
RELEASE=$REVISION
|
2009-08-03 22:57:46 +02:00
|
|
|
echo Creating Arduino distribution for revision $REVISION...
|
2009-05-31 17:53:33 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
ARCH=`uname -m`
|
|
|
|
if [ $ARCH != "i686" ]
|
|
|
|
then
|
|
|
|
echo At present, the Linux distribution can only be built on i686 \(32-bit\).
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
./make.sh
|
|
|
|
|
|
|
|
# remove any old boogers
|
2009-08-03 22:57:46 +02:00
|
|
|
rm -rf arduino
|
|
|
|
rm -rf arduino-*
|
|
|
|
|
|
|
|
mkdir arduino
|
|
|
|
cp -r ../shared/lib arduino/
|
|
|
|
cp -r ../shared/libraries arduino/
|
|
|
|
cp -r ../shared/tools arduino/
|
|
|
|
cp ../../app/lib/antlr.jar arduino/lib/
|
|
|
|
cp ../../app/lib/ecj.jar arduino/lib/
|
|
|
|
cp ../../app/lib/jna.jar arduino/lib/
|
|
|
|
cp ../../app/lib/oro.jar arduino/lib/
|
|
|
|
cp ../../app/lib/RXTXcomm.jar arduino/lib/
|
|
|
|
cp ../../readme.txt arduino/
|
|
|
|
|
|
|
|
cp -r ../../hardware arduino/
|
|
|
|
|
|
|
|
cp -r dist/tools arduino/hardware
|
|
|
|
cp dist/lib/librxtxSerial.so arduino/lib
|
2009-05-31 17:53:33 +02:00
|
|
|
|
|
|
|
if [ $1 ]
|
|
|
|
then
|
|
|
|
# write the release version number into the output directory
|
2009-08-03 22:57:46 +02:00
|
|
|
echo $1 > arduino/lib/version.txt
|
2009-05-31 17:53:33 +02:00
|
|
|
fi
|
|
|
|
|
2009-08-03 22:57:46 +02:00
|
|
|
echo Copying examples...
|
|
|
|
cp -r ../shared/examples arduino/
|
2009-05-31 17:53:33 +02:00
|
|
|
|
|
|
|
echo Extracting reference...
|
2009-08-03 22:57:46 +02:00
|
|
|
unzip -q -d arduino/ ../shared/reference.zip
|
2009-05-31 17:53:33 +02:00
|
|
|
|
|
|
|
# add java (jre) files
|
2009-08-03 22:57:46 +02:00
|
|
|
#tar --extract --file=jre.tgz --ungzip --directory=arduino
|
2009-05-31 17:53:33 +02:00
|
|
|
|
|
|
|
# grab pde.jar and export from the working dir
|
2009-08-03 22:57:46 +02:00
|
|
|
cp work/lib/pde.jar arduino/lib/
|
|
|
|
cp work/lib/core.jar arduino/lib/
|
2009-05-31 17:53:33 +02:00
|
|
|
|
|
|
|
# get platform-specific goodies from the dist dir
|
2009-08-03 22:57:46 +02:00
|
|
|
install -m 755 dist/arduino arduino/arduino
|
2009-05-31 17:53:33 +02:00
|
|
|
|
|
|
|
# make sure notes.txt is unix LFs
|
|
|
|
# the 2> is because the app is a little chatty
|
2009-08-03 22:57:46 +02:00
|
|
|
dos2unix arduino/readme.txt 2> /dev/null
|
|
|
|
dos2unix arduino/lib/preferences.txt 2> /dev/null
|
2009-05-31 17:53:33 +02:00
|
|
|
|
|
|
|
# remove boogers
|
2009-08-03 22:57:46 +02:00
|
|
|
find arduino -name "*~" -exec rm -f {} ';'
|
|
|
|
find arduino -name ".DS_Store" -exec rm -f {} ';'
|
|
|
|
find arduino -name "._*" -exec rm -f {} ';'
|
|
|
|
find arduino -name "Thumbs.db" -exec rm -f {} ';'
|
2009-05-31 17:53:33 +02:00
|
|
|
|
|
|
|
# clean out the cvs entries
|
2009-08-03 22:57:46 +02:00
|
|
|
find arduino -name "CVS" -exec rm -rf {} ';' 2> /dev/null
|
|
|
|
find arduino -name ".cvsignore" -exec rm -rf {} ';'
|
|
|
|
find arduino -name ".svn" -exec rm -rf {} 2> /dev/null ';'
|
2009-05-31 17:53:33 +02:00
|
|
|
|
|
|
|
# zip it all up for release
|
|
|
|
echo Creating tarball and finishing...
|
2009-08-03 22:57:46 +02:00
|
|
|
P5=arduino-$RELEASE
|
|
|
|
mv arduino $P5
|
2009-05-31 17:53:33 +02:00
|
|
|
|
|
|
|
tar cfz $P5.tgz $P5
|
|
|
|
# nah, keep the new directory around
|
|
|
|
#rm -rf $P5
|
|
|
|
|
|
|
|
echo Done.
|