Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbojar <bojar@1f5c12ca-751b-0410-a591-d2e778427230>2006-10-06 14:44:52 +0400
committerbojar <bojar@1f5c12ca-751b-0410-a591-d2e778427230>2006-10-06 14:44:52 +0400
commit0bba065b914e9e1d4004c53ae874608a3e49abdb (patch)
treee5fd7dfcefa618fa8e7303e8d8b0e9ef2e471dd5 /validate_revision.sh
parentaf941199cd5001c43754ac560401bf30c871de64 (diff)
Added two shell scripts to test if an SVN revision is compilable or not.
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@865 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'validate_revision.sh')
-rwxr-xr-xvalidate_revision.sh44
1 files changed, 44 insertions, 0 deletions
diff --git a/validate_revision.sh b/validate_revision.sh
new file mode 100755
index 000000000..357569cfe
--- /dev/null
+++ b/validate_revision.sh
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+rev="$1"
+
+if [ "$rev" == "" ]; then
+ cat << KONEC
+./validate_revision.sh <revnumber>
+ This will check, if the given revision was compilable (using irstlm).
+ These tasks will be performed:
+ svn update -r <revnumber>
+ compile and install irstlm to a temp directory
+ compile moses with irstlm
+ delete the temp directory
+KONEC
+ exit 1;
+fi
+
+tempdir=/tmp/validatemoses
+
+function die() {
+ rm -rf $tempdir
+ echo "$@"
+ exit 1
+}
+
+svn up -r $rev || die "Failed to update to rev. $rev"
+# dump the information
+svn info
+
+./regenerate-makefiles.sh || die "Failed to regenerate makefiles in mosesdecoder"
+
+
+cd irstlm || die "Failed to chdir to irstlm"
+./regenerate-makefiles.sh || die "Failed to regenerate makefiles in irstlm"
+./configure --prefix=$tempdir/irstlm || die "Failed to configure irstlm"
+make || die "Failed to compile irstlm"
+make install || die "Failed to install irstlm"
+cd ..
+
+./configure --with-irstlm=$tempdir/irstlm || die "Failed to configure moses"
+make || die "Failed to compile moses"
+
+rm -rf $tempdir || die "Failed to remove tempdir $tempdir"
+echo "Moses successfully compiled"