Revision: 8046 http://languagetool.svn.sourceforge.net/languagetool/?rev=8046&view=rev Author: gulp21-1 Date: 2012-09-15 09:54:44 +0000 (Sat, 15 Sep 2012) Log Message: ----------- [ltdiff] be aware of new paths
Modified Paths: -------------- trunk/JLanguageTool/src/main/dev/tools/ltdiff/ltdiff.bash Modified: trunk/JLanguageTool/src/main/dev/tools/ltdiff/ltdiff.bash =================================================================== --- trunk/JLanguageTool/src/main/dev/tools/ltdiff/ltdiff.bash 2012-09-15 09:19:16 UTC (rev 8045) +++ trunk/JLanguageTool/src/main/dev/tools/ltdiff/ltdiff.bash 2012-09-15 09:54:44 UTC (rev 8046) @@ -6,10 +6,20 @@ exit -1 fi -path_old="http://languagetool.svn.sourceforge.net/viewvc/languagetool/branches/$1/src/rules" +path_old="http://languagetool.svn.sourceforge.net/viewvc/languagetool/branches/$1/src/main/resources/org/languagetool/rules" if [ $2 == "trunk" ]; then - path_new="http://languagetool.svn.sourceforge.net/viewvc/languagetool/trunk/JLanguageTool/src/rules" + path_new="http://languagetool.svn.sourceforge.net/viewvc/languagetool/trunk/JLanguageTool/src/main/resources/org/languagetool/rules" else + path_new="http://languagetool.svn.sourceforge.net/viewvc/languagetool/branches/$2/src/main/resources/org/languagetool/rules" +fi + +# check whether the path exists; if it's not the case, we probably have to use the old paths +response=`curl -o /dev/null --silent --head --write-out '%{http_code}\n' $path_old` +if [ $response == "404" ]; then + path_old="http://languagetool.svn.sourceforge.net/viewvc/languagetool/branches/$1/src/rules" +fi +response=`curl -o /dev/null --silent --head --write-out '%{http_code}\n' $path_new` +if [ $response == "404" ]; then path_new="http://languagetool.svn.sourceforge.net/viewvc/languagetool/branches/$2/src/rules" fi @@ -38,9 +48,10 @@ mv $folder $folder~ mkdir $folder +# find all currently supported languages if no lang paramter is given if [ $# -eq 2 ]; then - langs=`ls -d ../../../rules/*/ -l | awk -F / '{print $(NF-1)}'` - langs=$langs" "`ls -d ../../../rules/*/*/ -l | awk -F / '{print $(NF-2)"/"$(NF-1)}'` # country variants + langs=`ls -d ../../../resources/org/languagetool/rules/*/ -l | awk -F / '{print $(NF-1)}'` + langs=$langs" "`ls -d ../../../resources/org/languagetool/rules/*/*/ -l | awk -F / '{print $(NF-2)"/"$(NF-1)}'` # country variants langs=`echo "$langs" | tr " " "\n" | sort |tr "\n" " "` # sort else langs=$3 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ Languagetool-cvs mailing list Languagetool-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/languagetool-cvs