diff options
author | M.Gergo | 2018-07-09 01:49:21 +0200 |
---|---|---|
committer | M.Gergo | 2018-07-09 01:49:21 +0200 |
commit | 0b26d2d6860e7fe428930b97dc953895aa1ca30c (patch) | |
tree | f52e25af89452cd6dc88df0103da57af029665a7 | |
parent | 154fd5aaf8811c1e6f1cf276e023c44a07bf7adf (diff) | |
download | mayor-0b26d2d6860e7fe428930b97dc953895aa1ca30c.tar.gz mayor-0b26d2d6860e7fe428930b97dc953895aa1ca30c.zip |
rev4332 Update hiba javítás. (*pre, *post fájloknak basename-t veszi, mert kötőjel lehet a PATH-ban is)
-rw-r--r-- | mayor-mod/update/rev4332-hoz_javitas/processUpdateScripts.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mayor-mod/update/rev4332-hoz_javitas/processUpdateScripts.sh b/mayor-mod/update/rev4332-hoz_javitas/processUpdateScripts.sh index a63578e6..eb931694 100644 --- a/mayor-mod/update/rev4332-hoz_javitas/processUpdateScripts.sh +++ b/mayor-mod/update/rev4332-hoz_javitas/processUpdateScripts.sh @@ -46,7 +46,7 @@ fi # -- run_script() { - FILEELEJE=`echo $FILE | cut -f 1 -d '-'` + FILEELEJE=$(basename $FILE | cut -f 1 -d '-') FILEREV=${FILEELEJE: -6} LOGSQL="" if [ "$FILEREV" != "" ]; then @@ -55,14 +55,14 @@ run_script() { fi fi if [ ! "${FILEREV}" \< "${REVSTR}" ]; then - FILEEXT=`echo $FILE | cut -f 2 -d '.'` + FILEEXT=$(basename $FILE | cut -f 2 -d '.') if [ "$FILEEXT" == "sh" ]; then echo " - Szkript futtatása ($FILE)..." . $FILE if [ $? != 0 ]; then exit 13; fi elif [ "$FILEEXT" == "sql" ]; then echo " - SQL utasítások végrehajtása ($FILE)..." - FILEDB=`echo $FILE | cut -f 1 -d '.' | cut -f 3 -d '-'` + FILEDB=$(basename $FILE | cut -f 1 -d '.' | cut -f 3 -d '-') case "$FILEDB" in naplo) DBS=$DB_NAPLO |