1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-19 13:54:25 +01:00

fix read path

This commit is contained in:
Sylvain 2019-10-22 12:20:00 +02:00
parent a787814c6a
commit 0555883ea3

View File

@ -76,7 +76,8 @@ test_docker_compose()
read_path()
{
PG_PATH=$(awk "BEGIN { FS=\"\n\"; RS=\"\"; } { match(\$0, /image: postgres:$OLD(\n|.)+volumes:(\n|.)+(-.*postgresql\/data)/, lines); FS=\"[ :]+\"; RS=\"\r\n\"; split(lines[3], line); print line[2] }" "$FM_PATH/docker-compose.yml")
PG_PATH="${PG_PATH/@(\$\{PWD\}|\.)/$(pwd)}"
PG_PATH="${PG_PATH/\$\{PWD\}/$FM_PATH}"
PG_PATH="${PG_PATH/\./$FM_PATH}"
PG_PATH="${PG_PATH/[[:space:]]/}"
}