Moving
[apertium.git] / trunk / apertium-eval-translator / install.sh
blobde2c78ad076489668dedff3aa7daa4ec8dc6fd48
2 if [ -z $1 ]
3 then
4 TARGET_PATH=/usr/local/bin
5 else
6 TARGET_PATH=$1
7 fi
9 PERLPATH=$(which perl)
11 if [ -z $PERLPATH ]
12 then
13 echo "Perl executable was not found"
14 echo "Install Perl first, then try again."
15 exit 1
18 echo "Copying apertium-eval-translator in $TARGET_PATH"
20 echo -n "#!" > apertium-eval-translator
21 echo "$PERLPATH -w " >> apertium-eval-translator
22 cat eval-translator.pl >> apertium-eval-translator
23 chmod +x apertium-eval-translator
25 cp apertium-eval-translator $TARGET_PATH
27 if [ $? -eq 0 ]
28 then
29 echo "apertium-eval-translator successfully installed"
30 else
31 echo "Installation failed. Are you root?"
34 exit 0