#!/bin/sh

rm -rf nbbuild/netbeans/ nbrubyide applemenu netbeans.png netbeans.icns conf
unzip -d nbbuild/ ../../trunk/lastSuccessful/archive/nbbuild/dist/zip/netbeans-hudson-trunk-*-basic.zip

cp nbbuild/netbeans/nb/netbeans.icns nbbuild/netbeans/nb/netbeans.png .

mkdir core
ant -Dverify.checkout=false -f ruby/build.xml clean build-experimental-zip && \
    ant -Dnbplatform.default.netbeans.dest.dir=$PWD/nbbuild/netbeans \
        -Dnbplatform.default.harness.dir=$PWD/nbbuild/netbeans/harness \
        -Dverify.checkout=false \
        -f ruby/rubyide/build.xml clean build-zip && \
    mv ruby/netbeans-ruby.zip ruby/netbeans-ruby-hudson-${BUILD_NUMBER}.zip && \
    mv ruby/rubyide/dist/nbrubyide.zip ruby/rubyide/dist/netbeans-rubyide-hudson-${BUILD_NUMBER}.zip && \
    source nbbuild/hudson/ruby-etcconf && \
    source nbbuild/hudson/ruby-mkosx && \
rm -rf nbrubyide netbeans.icns netbeans.png conf

