Permalink
Browse files

fixed the generator to work on both Linux and Mac

git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@774 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information...
grammarware committed Feb 22, 2010
1 parent aa96345 commit 353a2c28b9ea52f7f902be5d143aca2ccc0d1b5f
Showing with 6 additions and 2 deletions.
  1. +5 −1 shared/generators/reroot2top
  2. +1 −1 topics/presentation/metrics/listtops.xpath
@@ -15,7 +15,11 @@ elif [ ! -r $1 ]; then
exit 1
else
rm -f $2
- xpath $1 `cat ${SLPS}/topics/presentation/metrics/listtops.xpath` 1> $2.tmp 2> /dev/null
+ if [ `uname` = 'Linux' ] ; then
+ xpath -e `cat ${SLPS}/topics/presentation/metrics/listtops.xpath` $1 1> $2.tmp 2> /dev/null
+ else
+ xpath $1 `cat ${SLPS}/topics/presentation/metrics/listtops.xpath` 1> $2.tmp 2> /dev/null
+ fi
python ${SLPS}/shared/python/reroot2nts.py $2.tmp $2
rm -f $2.tmp
fi
@@ -1 +1 @@
-/*/*/nonterminal[not(text()=/*/*/*//nonterminal/text()) and not(text()=../preceding-sibling::*/nonterminal/text())]
+/*/*/nonterminal[not(text()=/*/*/*//nonterminal/text())][not(text()=../preceding-sibling::*/nonterminal/text())]

0 comments on commit 353a2c2

Please sign in to comment.