Skip to content

Commit

Permalink
Merge pull request #797 from ax3l/fix-tbgDirAccess
Browse files Browse the repository at this point in the history
Fix #795 TBG Exit on mkdir Error
  • Loading branch information
psychocoderHPC committed Apr 8, 2015
2 parents 2ecc1c3 + b4d287b commit 7905fa9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/tools/bin/tbg
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,10 @@ job_relative_dir=`dirname "$outDir"`

#create relative dir that we can jump in and check absolute dir
mkdir -p "$job_relative_dir"
if [ $? -ne 0 ] ; then
echo "Could not create directory in: $job_relative_dir" >&2
exit 1
fi
job_outDir=`cd "$job_relative_dir"; pwd`"/$job_name"

if [ -z "$tooltpl_file" ] ; then
Expand Down Expand Up @@ -326,6 +330,10 @@ export TBG_projectPath="$projectPath"
export TBG_dstPath="$job_outDir"

mkdir -p "$job_outDir"
if [ $? -ne 0 ] ; then
echo "Could not create directory in: $job_outDir" >&2
exit 1
fi
mkdir -p "$job_outDir/tbg"
cd "$job_outDir"

Expand Down

0 comments on commit 7905fa9

Please sign in to comment.