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:
authorskyload <skyload@1f5c12ca-751b-0410-a591-d2e778427230>2010-04-21 16:10:24 +0400
committerskyload <skyload@1f5c12ca-751b-0410-a591-d2e778427230>2010-04-21 16:10:24 +0400
commita7f4472035076ddb35e0ae3522af817bdf02f13c (patch)
tree5e608403d7f530d36d9b64124420ad2210c58ba4
parent62e8bae40262797b92041a97e27456bb1c21648f (diff)
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/branches/DPR_MOSES@3183 1f5c12ca-751b-0410-a591-d2e778427230
-rw-r--r--validate_revision.sh50
1 files changed, 50 insertions, 0 deletions
diff --git a/validate_revision.sh b/validate_revision.sh
new file mode 100644
index 000000000..a29eeed7c
--- /dev/null
+++ b/validate_revision.sh
@@ -0,0 +1,50 @@
+#!/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
+}
+
+if svn status | grep '^[^\?]'; then
+ die "Will not go to a different revision, please synchronize with a revision in repository first"
+fi
+
+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 clean || die "Failed to clean 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 clean || die "Failed to clean moses"
+make || die "Failed to compile moses"
+
+rm -rf $tempdir || die "Failed to remove tempdir $tempdir"
+echo "Moses successfully compiled"