#/bin/sh
#

#fix cpp bindings
sed -e "50,100000s/\<new\>/_CLNEW/g" -e "50,100000s/\(\<delete\>\) \(.*\);/_CLDECDELETE\(\2\);/g" _clucene_binding.cpp.tmp >_clucene_binding.cpp
rm _clucene_binding.cpp.tmp

#move-clean:
rm _CL_p_p_charArray.cs
rm _CL_p_uint8_tArray.cs
rm _CL_p_int32_tArray.cs
rm _CL_p_p_lucene__index__IndexReaderArray.cs
rm _CL_p_p_lucene__index__TermFreqVectorArray.cs
rm _CL_p_p_lucene__search__SortFieldArray.cs
rm _CL_p_p_lucene__search__SearchableArray.cs

#move-store:
mv -f Directory.cs src/store/
mv -f InputStream.cs src/store/
mv -f OutputStream.cs src/store/
mv -f FSDirectory.cs src/store/
mv -f RAMDirectory.cs src/store/
mv -f RAMInputStream.cs src/store/
mv -f RAMOutputStream.cs src/store/

#move-document:
mv -f Document.cs src/document/
mv -f Field.cs src/document/
mv -f DateField.cs src/document/
mv -f DocumentFieldEnumeration.cs src/document/

#move-util:
mv -f Reader.cs src/util/
mv -f BitSet.cs src/util/
mv -f BitVector.cs src/util/
mv -f FileReader.cs src/util/
mv -f StringReader.cs src/util/
mv -f Debug.cs src/util/

#move-analysis:
mv -f Analyzer.cs src/analysis/
mv -f Token.cs src/analysis/
mv -f TokenStream.cs src/analysis/
mv -f WhitespaceAnalyzer.cs src/analysis/
mv -f SimpleAnalyzer.cs src/analysis/
mv -f StopAnalyzer.cs src/analysis/
mv -f PerFieldAnalyzerWrapper.cs src/analysis/
mv -f StandardAnalyzer.cs src/analysis/standard

#move-index:
mv -f Term.cs src/index/
mv -f TermDocs.cs src/index/
mv -f TermPositions.cs src/index/
mv -f TermEnum.cs src/index/
mv -f IndexReader.cs src/index/
mv -f DocumentWriter.cs src/index/
mv -f IndexWriter.cs src/index/
mv -f MultiReader.cs src/index/
mv -f TermFreqVector.cs src/index/
mv -f SegmentInfo.cs src/index/
mv -f SegmentInfos.cs src/index/
mv -f SegmentReader.cs src/index/
mv -f SegmentMerger.cs src/index/
mv -f CompoundFileReader.cs src/index/
mv -f CompoundFileWriter.cs src/index/

#move-search:
mv -f Similarity.cs src/search/
mv -f Hits.cs src/search/
mv -f Filter.cs src/search/
mv -f HitDoc.cs src/search/
mv -f DateFilter.cs src/search/
mv -f Query.cs src/search/
mv -f Explanation.cs src/search/
mv -f Searchable.cs src/search/
mv -f Searcher.cs src/search/
mv -f Sort.cs src/search/
mv -f SortField.cs src/search/
mv -f IndexSearcher.cs src/search/
mv -f MultiSearcher.cs src/search/
mv -f TermQuery.cs src/search/
mv -f BooleanQuery.cs src/search/
mv -f PhraseQuery.cs src/search/
mv -f MultiTermQuery.cs src/search/
mv -f WildcardQuery.cs src/search/
mv -f RangeQuery.cs src/search/
mv -f PrefixQuery.cs src/search/

#move-queryParser:
mv -f queryParser.cs src/queryParser/

#support stuff
mv -f libCLcsharpPINVOKE.cs src/
mv -f _clucene_binding.cpp native/
