Skip to content

Commit ec889e3

Browse files
committed
scripts: drop DB option in clean-instance.sh
* Introduces ``--drop`` option for ``clean-instance.sh`` script. Useful for running on CERN OpenShift deployments. Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
1 parent ad2eaf7 commit ec889e3

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

scripts/clean-instance.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
#
33
# This file is part of Invenio.
4-
# Copyright (C) 2015, 2016, 2017 CERN.
4+
# Copyright (C) 2015, 2016, 2017, 2018 CERN.
55
#
66
# Invenio is free software; you can redistribute it
77
# and/or modify it under the terms of the GNU General Public License as
@@ -26,8 +26,12 @@
2626
set -o errexit
2727
set -o nounset
2828

29-
# destroy database:
30-
cernopendata db destroy --yes-i-know
29+
# drop or destroy database:
30+
if [[ "$@" = *"--drop"* ]]; then
31+
cernopendata db drop --yes-i-know
32+
else
33+
cernopendata db destroy --yes-i-know
34+
fi
3135

3236
# destroy indexes:
3337
cernopendata index destroy --force --yes-i-know

0 commit comments

Comments
 (0)