Skip to content

Commit cffddb7

Browse files
committed
add some helpful error messages if the output directory doesn't exist (from issue #26, proposed by yunfan @yunfan)
1 parent c941da6 commit cffddb7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

make.sh

+14
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,20 @@ shift $((OPTIND-1))
178178
#echo "gl_opt_no_valgrind:$gl_opt_no_valgrind"
179179
#echo "gl_opt_no_m32:$gl_opt_no_m32"
180180

181+
if [ -e "$OUTPUT_DIR" ]
182+
then
183+
if [ -d "$OUTPUT_DIR" ]
184+
then
185+
:
186+
else
187+
error "\"$OUTPUT_DIR\" is not a directory"
188+
exit 1
189+
fi
190+
else
191+
error "directory \"$OUTPUT_DIR\" doesn't exist"
192+
exit 1
193+
fi
194+
181195
tra "echo;echo build has been interrupted"
182196

183197
# the matrix of the build config for later testing

0 commit comments

Comments
 (0)