#!/bin/sh

OUT="$(find "$(dirname "$0")/../packaging/dbscripts" | grep -P '\d{2}_\d{2}_\d{2,8}' -o | sort | uniq -d)"

if [ -n "${OUT}" ]; then
	echo "Found duplicate upgrade scripts with version $(echo ${OUT}), please resolve and retry" >&2
	exit 1
fi

exit 0

#!/bin/sh

OUT="$(find "$(dirname "$0")/../packaging/dbscripts" | grep -P '^\d{2}_\d{2}_\d{2,8}' -o | sort | uniq -d)"

if [ -n "${OUT}" ]; then
	echo "Found duplicate upgrade scripts with version $(echo ${OUT}), please resolve and retry" >&2
	exit 1
fi

exit 0

Fix db upgrage scripts numbering check
core: Fix db upgrage scripts numbering check

Fixes issue in db upgrade scripts numbering check to prevent duplicate
scripts with same number.

Change-Id: Ibec57eac9cc30a0aa776f064b50d5eccf1626e07
Signed-off-by: Martin Perina <7bf83f5b771f1cc16b652b5fe02fa33310bda7b0@redhat.com>
