Index: trunk/wikiation/wikiation_check_isolation/LICENSE |
— | — | @@ -1,5 +1,7 @@ |
2 | 2 | This software, copyright (C) 2008-2009 by Wikiation. This software is developed by Kim Bruning. |
| 3 | +Copyright (C) 2009 Kim Bruning |
3 | 4 | |
| 5 | + |
4 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy |
5 | 7 | of this software and associated documentation files (the "Software"), to deal |
6 | 8 | in the Software without restriction, including without limitation the rights to |
Index: trunk/wikiation/wikiation_check_isolation/compare_mw.sh |
— | — | @@ -1,4 +1,4 @@ |
2 | | -#!/bin/sh |
| 2 | +#!/bin/bash |
3 | 3 | #compare local mediawiki installation with our own copy |
4 | 4 | |
5 | 5 | # This software, copyright (C) 2008-2009 by Wikiation. |
Index: trunk/wikiation/wikiation_check_isolation/compare_db.sh |
— | — | @@ -1,4 +1,4 @@ |
2 | | -#!/bin/sh |
| 2 | +#!/bin/bash |
3 | 3 | # compare database description directories created by |
4 | 4 | # dump_desc.sh, and write a report to current/ |
5 | 5 | |
Index: trunk/wikiation/wikiation_check_isolation/create_data.sh |
— | — | @@ -1,4 +1,4 @@ |
2 | | -#!/bin/sh |
| 2 | +#!/bin/bash |
3 | 3 | # This software, copyright (C) 2008-2009 by Wikiation. |
4 | 4 | # This software is developed by Kim Bruning. |
5 | 5 | # |
Index: trunk/wikiation/wikiation_check_isolation/compare_all.sh |
— | — | @@ -1,4 +1,4 @@ |
2 | | -#!/bin/sh |
| 2 | +#!/bin/bash |
3 | 3 | |
4 | 4 | # This software, copyright (C) 2008-2009 by Wikiation. |
5 | 5 | # This software is developed by Kim Bruning. |
— | — | @@ -41,3 +41,5 @@ |
42 | 42 | echo -e "$RED * $NC MediaWiki Database differences: " |
43 | 43 | cat $current/dbdiff_report |
44 | 44 | } |
| 45 | + |
| 46 | +exit ! ( -s $current/mwdiff_report || -s $current/dbdiff_report ) |
Index: trunk/wikiation/wikiation_check_isolation/dl_and_check.sh |
— | — | @@ -1,4 +1,4 @@ |
2 | | -#!/bin/sh |
| 2 | +#!/bin/bash |
3 | 3 | #load data on a particular revision |
4 | 4 | # This software, copyright (C) 2008-2009 by Wikiation. |
5 | 5 | # This software is developed by Kim Bruning. |
— | — | @@ -15,12 +15,21 @@ |
16 | 16 | |
17 | 17 | target=$1 |
18 | 18 | |
19 | | -if test -z $target; then |
20 | | - echo "syntax: wikiation_check_isolation <revision name>" |
| 19 | +if test -z $1; then |
| 20 | + echo "syntax: check_isolation <revision name>" |
21 | 21 | exit 0 |
22 | 22 | fi |
23 | 23 | |
24 | | -target_dir="/var/www/revisions/$target" |
| 24 | + |
| 25 | +if echo $1 | grep "/" ; then |
| 26 | + target=`basename $1` |
| 27 | + target_dir=`dirname $1` |
| 28 | +else |
| 29 | + target=$1 |
| 30 | + target_dir="/var/www/revisions/$target"; |
| 31 | +fi |
| 32 | + |
| 33 | + |
25 | 34 | if test ! -e $target_dir; then |
26 | 35 | echo "$target not found" |
27 | 36 | exit 0 |
— | — | @@ -32,6 +41,7 @@ |
33 | 42 | |
34 | 43 | export mediawiki=$target |
35 | 44 | export mediawiki_location=$target_dir |
36 | | - $ScriptLocation/load.sh $target && |
37 | | - echo "Running checks:" && |
38 | | - $ScriptLocation/compare_all.sh $p1 $p2 |
| 45 | +$ScriptLocation/load.sh $target && |
| 46 | +echo "Running checks:" && |
| 47 | +$ScriptLocation/compare_all.sh $p1 $p2 |
| 48 | +exit $? |
Index: trunk/wikiation/wikiation_check_isolation/save.sh |
— | — | @@ -1,4 +1,4 @@ |
2 | | -#!/bin/sh |
| 2 | +#!/bin/bash |
3 | 3 | |
4 | 4 | # This software, copyright (C) 2008-2009 by Wikiation. |
5 | 5 | # This software is developed by Kim Bruning. |
Index: trunk/wikiation/wikiation_check_isolation/load.sh |
— | — | @@ -1,4 +1,4 @@ |
2 | | -#!/bin/sh |
| 2 | +#!/bin/bash |
3 | 3 | |
4 | 4 | # This software, copyright (C) 2008-2009 by Wikiation. |
5 | 5 | # This software is developed by Kim Bruning. |
Index: trunk/wikiation/wikiation_check_isolation/dump_desc.sh |
— | — | @@ -1,4 +1,4 @@ |
2 | | -#!/bin/sh |
| 2 | +#!/bin/bash |
3 | 3 | # create a directory describing wiki database (for easy diff-ing) |
4 | 4 | |
5 | 5 | # This software, copyright (C) 2008-2009 by Wikiation. |
Index: trunk/wikiation/wikiation_check_isolation/create_and_ul.sh |
— | — | @@ -1,4 +1,4 @@ |
2 | | -#!/bin/sh |
| 2 | +#!/bin/bash |
3 | 3 | #save data on a particular revision |
4 | 4 | |
5 | 5 | # This software, copyright (C) 2008-2009 by Wikiation. |
— | — | @@ -7,15 +7,23 @@ |
8 | 8 | # Distributed under the terms of the MIT license. |
9 | 9 | |
10 | 10 | |
11 | | - |
12 | 11 | if [[ $0 == '/'* ]]; then |
13 | 12 | ScriptLocation="`dirname $0`" |
14 | 13 | else |
15 | 14 | ScriptLocation="`pwd`"/"`dirname $0`" |
16 | 15 | fi |
17 | 16 | |
18 | | -target=$1 |
19 | | -target_dir="/var/www/revisions/$target"; |
| 17 | + |
| 18 | + |
| 19 | +if echo $1 | grep "/" ; then |
| 20 | + target=`basename $1` |
| 21 | + target_dir=`dirname $1` |
| 22 | +else |
| 23 | + target=$1 |
| 24 | + target_dir="/var/www/revisions/$target"; |
| 25 | +fi |
| 26 | + |
| 27 | + |
20 | 28 | if test ! -e $target_dir; then |
21 | 29 | echo "$target not found" |
22 | 30 | exit 0 |