Skip to content

Commit

Permalink
fixed the generator to work on both Linux and Mac
Browse files Browse the repository at this point in the history
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 353a2c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion shared/generators/reroot2top
Expand Up @@ -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
2 changes: 1 addition & 1 deletion topics/presentation/metrics/listtops.xpath
@@ -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.