Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #url_format=http://eatenbyagrue.org/f/pioneer=%s
- #upload_dir=fce2@kalamazoo.dreamhost.com:eatenbyagrue.org/f/pioneer
- url_format=http://sourceforge.net/projects/pioneerspacesim/files/nightly/%s/download
- upload_dir=robertnorris,pioneerspacesim@frs.sf.net:/home/frs/project/p/pi/pioneerspacesim/nightly
- branch=master
- #branch=alpha14-freeze
- ref=0
- configure_opts="--enable-debug"
- function build_linux {
- cd /home/rob/pioneer
- make distclean
- (./bootstrap && ./configure $configure_opts --with-extra-version=$ref && make clean && make -j3) || exit 1
- base="pioneer-$ref-linux"
- dir="/home/rob/$base"
- mkdir $dir
- cp -v src/pioneer src/modelviewer $dir
- cp -v AUTHORS.txt Modelviewer.txt README.txt Changelog.txt *COPYING.txt Quickstart.txt $dir
- cp -rv data $dir/data
- find $dir/data -name .gitignore -exec rm '{}' ';'
- cd /home/rob
- tar cvf $base.tar $base
- bzip2 $base.tar
- rm -rf $dir
- }
- function build_win32 {
- old_path=$PATH
- export PATH=/home/rob/mingw-cross-env-2.19/usr/bin:/home/rob/mingw-cross-env-2.19/usr/i686-pc-mingw32/bin:$PATH
- cd /home/rob/pioneer
- make distclean
- (./bootstrap && ./configure --host=i686-pc-mingw32 $configure_opts --with-extra-version=$ref && make clean && make -j3) || exit 1
- base="pioneer-$ref-win32"
- dir="/home/rob/$base"
- mkdir $dir
- cp -v src/pioneer.exe src/modelviewer.exe $dir
- cp -v AUTHORS.txt Modelviewer.txt README.txt Changelog.txt *COPYING.txt Quickstart.txt $dir
- #cp -v win32/lib/*.dll $dir
- cp -rv data $dir/data
- find $dir/data -name .gitignore -exec rm '{}' ';'
- cd /home/rob
- 7za a $base.7z $base
- rm -rf $dir
- export PATH=$old_path
- }
- echo "updating source"
- cd /home/rob/pioneer
- git fetch || exit 1
- git checkout $branch
- git merge robn/$branch
- ref=`git log -n1 --pretty=%h $branch`
- linux_url=`printf $url_format pioneer-$ref-linux.tar.bz2`
- win32_url=`printf $url_format pioneer-$ref-win32.tar.bz2`
- #curl -fsIo /dev/null $linux_url
- #if [ $? == 0 ] ; then
- # echo "Builds are up to date."
- # exit 0
- #fi
- build_linux
- build_win32
- echo "uploading"
- scp "pioneer-$ref-linux.tar.bz2" "pioneer-$ref-win32.7z" $upload_dir
- if [ $? != 0 ] ; then
- echo "Upload failed, bailing out."
- exit 1
- fi
- rm "pioneer-$ref-linux.tar.bz2" "pioneer-$ref-win32.7z"
- echo "tweeting"
- twidge update "new dev build available! linux $linux_url windows $win32_url #pioneerspacesim"
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement