Skip to content

Commit

Permalink
Improve how we export home path to enhance debug.
Browse files Browse the repository at this point in the history
  • Loading branch information
gugavaro committed Nov 13, 2018
1 parent 20b0ef3 commit 518dde4
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .docker/build/build.sh
Expand Up @@ -8,10 +8,21 @@ threads=$3
branchname=$4

function export_home() {
local home_path=""
if command -v cygpath >/dev/null 2>&1; then
export $1_HOME=$(cygpath -m "$2")
home_path=$(cygpath -m "$2")
else
export $1_HOME="$2"
home_path="$2"
fi

export $1_HOME=$home_path

# Update .bashrc file
token=$1_HOME=
if grep -q "$token" ~/.bashrc; then
sed -i -E "s/$token.*/$token$home_path/" ~/.bashrc
else
echo "export $1_HOME=$home_path" >> ~/.bashrc
fi
}

Expand Down

0 comments on commit 518dde4

Please sign in to comment.