@@ -65,7 +65,7 @@ test_check_precond () {
65
65
GIT_EXEC_PATH=$( cd " $( dirname " $0 " ) " && cd " ../.." && pwd)
66
66
PATH=" $GIT_EXEC_PATH " ' /bin-wrapper:' " $PATH "
67
67
68
- if [ ! -d " $WIKI_DIR_INST /$WIKI_DIR_NAME " ] ;
68
+ if ! test -d " $WIKI_DIR_INST /$WIKI_DIR_NAME "
69
69
then
70
70
skip_all=' skipping gateway git-mw tests, no mediawiki found'
71
71
test_done
@@ -304,7 +304,8 @@ create_db () {
304
304
php " $FILES_FOLDER /$DB_INSTALL_SCRIPT " $( basename " $DB_FILE " .sqlite) \
305
305
" $WIKI_ADMIN " " $WIKI_PASSW " " $TMP " " $PORT "
306
306
307
- if [ ! -f " $TMP /$DB_FILE " ] ; then
307
+ if ! test -f " $TMP /$DB_FILE "
308
+ then
308
309
error " Can't create database file $TMP /$DB_FILE . Try to run ./install-wiki.sh delete first."
309
310
fi
310
311
@@ -325,15 +326,17 @@ wiki_install () {
325
326
# unpack and copy the files of MediaWiki
326
327
(
327
328
mkdir -p " $WIKI_DIR_INST /$WIKI_DIR_NAME "
328
- if [ ! -d " $WIKI_DIR_INST /$WIKI_DIR_NAME " ] ; then
329
+ if ! test -d " $WIKI_DIR_INST /$WIKI_DIR_NAME "
330
+ then
329
331
error " Folder $WIKI_DIR_INST /$WIKI_DIR_NAME doesn't exist.
330
332
Please create it and launch the script again."
331
333
fi
332
334
333
335
# Fetch MediaWiki's archive if not already present in the TMP directory
334
336
MW_FILENAME=" mediawiki-$MW_VERSION_MAJOR .$MW_VERSION_MINOR .tar.gz"
335
337
cd " $TMP "
336
- if [ ! -f $MW_FILENAME ] ; then
338
+ if ! test -f $MW_FILENAME
339
+ then
337
340
echo " Downloading $MW_VERSION_MAJOR .$MW_VERSION_MINOR sources ..."
338
341
wget " http://download.wikimedia.org/mediawiki/$MW_VERSION_MAJOR /$MW_FILENAME " ||
339
342
error " Unable to download " \
@@ -359,7 +362,8 @@ wiki_install () {
359
362
# And modify parameters according to the ones set at the top
360
363
# of this script.
361
364
# Note that LocalSettings.php is never modified.
362
- if [ ! -f " $FILES_FOLDER /LocalSettings.php" ] ; then
365
+ if ! test -f " $FILES_FOLDER /LocalSettings.php"
366
+ then
363
367
error " Can't find $FILES_FOLDER /LocalSettings.php " \
364
368
" in the current folder. " \
365
369
" Please run the script inside its folder."
@@ -401,7 +405,8 @@ wiki_install () {
401
405
# Warning: This function must be called only in a subdirectory of t/ directory
402
406
wiki_reset () {
403
407
# Copy initial database of the wiki
404
- if [ ! -f " ../$FILES_FOLDER /$DB_FILE " ] ; then
408
+ if ! test -f " ../$FILES_FOLDER /$DB_FILE "
409
+ then
405
410
error " Can't find ../$FILES_FOLDER /$DB_FILE in the current folder."
406
411
fi
407
412
cp " ../$FILES_FOLDER /$DB_FILE " " $TMP " ||
0 commit comments