summaryrefslogtreecommitdiffstats
path: root/mcp/patches/patch.sh
diff options
context:
space:
mode:
authorMichael Polenchuk <mpolenchuk@mirantis.com>2017-07-12 12:29:30 +0400
committerMichael Polenchuk <mpolenchuk@mirantis.com>2017-07-12 13:39:17 +0400
commitd676c91a67684a7efb317d58429c49db7c562473 (patch)
treedd9c4b19f666825d15d4b08845bcd14cfe91ab93 /mcp/patches/patch.sh
parent5005e2f8a9c4d9bb10feeea61d8e5651d76fc2b7 (diff)
Apply reclass patches before salt master init
Change-Id: I7bb984880e98b7bdec9aa0b3895a3be9fd75cac0 Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
Diffstat (limited to 'mcp/patches/patch.sh')
-rwxr-xr-xmcp/patches/patch.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/mcp/patches/patch.sh b/mcp/patches/patch.sh
index 9f9cdea0e..d7db73591 100755
--- a/mcp/patches/patch.sh
+++ b/mcp/patches/patch.sh
@@ -1,8 +1,7 @@
-#!/bin/sh
+#!/bin/bash
if [ -r "$1" ]; then
while IFS=': ' read -r p_dest p_file; do
- patch -d $p_dest -p1 < /root/fuel/mcp/patches/$p_file
+ [[ "${p_dest}" =~ $2 ]] && patch -fd "${p_dest}" -p1 < "/root/fuel/mcp/patches/${p_file}"
done < $1
fi
-