From 2c1afbdd0c73323a53ffa3d9661e24da59dd41e5 Mon Sep 17 00:00:00 2001
From: tpylak <tpylak>
Date: Wed, 8 Dec 2010 10:11:15 +0000
Subject: [PATCH] minor: correct script to generate next db version

SVN: 19050
---
 openbis/resource/scripts/common.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openbis/resource/scripts/common.sh b/openbis/resource/scripts/common.sh
index 7e1fb5c8309..3c220deefde 100755
--- a/openbis/resource/scripts/common.sh
+++ b/openbis/resource/scripts/common.sh
@@ -4,7 +4,7 @@
 
 SQL_DIR=../../source/sql/
 
-PREV_NUM=`ls -1 $SQL_DIR/postgresql | grep 0 | sort | tail -n 1 | sed /0/s///`
+PREV_NUM=`ls -1 $SQL_DIR/postgresql | grep 0 | sort | tail -n 1 | sed s/^0*//g`
 PREV_VER=`printf "%03d" $PREV_NUM`
 CUR_VER=`printf "%03d" $(( $PREV_NUM+1 ))`
 
-- 
GitLab