File: UPDATE.zsh

package info (click to toggle)
netbeans-ide 6.0.1%2Bdfsg-2
  • links: PTS, VCS
  • area: contrib
  • in suites: lenny
  • size: 741,536 kB
  • ctags: 613,961
  • sloc: java: 3,969,489; xml: 336,553; jsp: 11,861; ruby: 10,091; cpp: 4,127; sh: 3,417; ansic: 1,734; sql: 1,306; haskell: 1,019; makefile: 487; perl: 403; objc: 288; php: 120
file content (56 lines) | stat: -rw-r--r-- 1,992 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/zsh
# Script which updates the preindexed files
# See INDICES.txt for more info. 
# Some interactive participation is necessary. The script will start the IDE twice.
# Each time, create a new Rails Project, wait until indexing is done, then exit.
# It's important to create a Rails project and not a plain Ruby project since plain
# Ruby projects may filter out some unnecessary gems.
# Configure the following parameters:

NBCVSHOME=~/netbeans/work
#NATIVERUBYHOME=/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386
NATIVERUBYHOME=/Users/tor/dev/ruby/install/ruby-1.8.5/

# You probably don't want to change these:
NB=$NBCVSHOME/nbbuild/netbeans/bin/netbeans
# Location of a Ruby interpreter which contains lots of gems
NATIVERUBY=$NATIVERUBYHOME/bin/ruby
SCRATCHFILE=/tmp/native.zip
USERDIR=/tmp/preindexing

#############################################################################################
# No user-configurable parts beyond this point...

RUBY1=$NBCVSHOME/nbbuild/netbeans/ruby1
unset GEM_HOME

find $RUBY1 . -name "netbeans-index*.zip" -exec rm {} \;
find $NATIVERUBYHOME . -name "netbeans-index*.zip" -exec rm {} \;
rm -rf $RUBY1/preindexed/lib

rm -rf $USERDIR
$NB -J-Dgsf.preindexing=true -J-Druby.computeindex --userdir $USERDIR
rm -rf $USERDIR
$NB -J-Dgsf.preindexing=true -J-Druby.computeindex --userdir $USERDIR -J-Druby.interpreter=$NATIVERUBY

# Pack preindexed.zip
cd $RUBY1
rm -f preindexed-jruby.zip
zip -r preindexed-jruby.zip `find . -name "netbeans-index*" | egrep -v "action|active|rails"`
mv preindexed-jruby.zip $NBCVSHOME/ruby/platform/release/preindexed.zip
rm -f preindexed-jruby.zip

# Go to the native installation:
cd $NATIVERUBYHOME
rm -f $SCRATCHFILE
zip -r $SCRATCHFILE `find . -name "netbeans*.zip"` 

cd $RUBY1
rm -rf preindexed
mkdir preindexed
cd preindexed
unzip $SCRATCHFILE
cd ..
rm $NBCVSHOME/ruby/platform/release/preindexed-native.zip
zip -r $NBCVSHOME/ruby/platform/release/preindexed-native.zip preindexed/