Skip to content

Commit 106b436

Browse files
committed
add ignore version check option
1 parent 6fce21c commit 106b436

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

upgrade_phpMyAdmin.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ echo
5353
# read -e -p "Upgrade to version (e.g. 0.59.0): " VERSION
5454

5555
interactive=true
56+
check_version=true
5657

5758
while test $# -gt 0; do
5859
case $1 in
@@ -63,13 +64,18 @@ while test $# -gt 0; do
6364
echo
6465
echo "Options:"
6566
echo "-a Automatic mode"
67+
echo "-C Ignore version check"
6668
echo "-h, --help Help"
6769
quit
6870
;;
6971
-a)
7072
interactive=false
7173
shift
7274
;;
75+
-C)
76+
check_version=false
77+
shift
78+
;;
7379
esac
7480
done
7581

@@ -81,7 +87,7 @@ OLDVERSION=$(cat $BIN/$DEST/_VERSION.txt || echo "")
8187
echo -e "\nUpgrade phpMyAdmin $VERSION"
8288
echo -e "Current version: $OLDVERSION\n"
8389

84-
if [ "$VERSION" = "$OLDVERSION" ]; then
90+
if [ "$VERSION" = "$OLDVERSION" ] && $check_version; then
8591
echo "Versions are equal."
8692
quit
8793
fi

0 commit comments

Comments
 (0)