From 91c874abc73abde38f16b210fb6f6b3845bdfcb3 Mon Sep 17 00:00:00 2001 From: ezsh <ezsh.junk@gmail.com> Date: Fri, 15 Mar 2019 11:33:07 +0100 Subject: [PATCH] Ensure bin dir exists in the simplest way Replace the find and if calls with simple mkdir -p which does exactly what is required here. --- compile | 5 +++-- compile-git | 4 +++- compile-git+java-sanityCheck.sh | 4 +++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/compile b/compile index a85bdfa5024..d11d2047cdf 100755 --- a/compile +++ b/compile @@ -1,5 +1,7 @@ #!/bin/bash -find bin/ >/dev/null 2>&1;if [ `echo $?` -gt 0 ];then mkdir bin/;fi + +mkdir -p bin + while [[ "$1" ]] do case $1 in @@ -68,4 +70,3 @@ sed -i -e '/^.*<div id="store-area".*$/s/\\t/\t/g' -e '/^.*<div id="store-area". && mv bin/FC_pregmod_tmp.html bin/FC_pregmod.html echo "bin/FC_pregmod.html compilation finished." - diff --git a/compile-git b/compile-git index 55acb04d1a0..5e011a38ed5 100755 --- a/compile-git +++ b/compile-git @@ -1,5 +1,7 @@ #!/bin/bash -find bin/ >/dev/null 2>&1;if [ `echo $?` -gt 0 ];then mkdir bin/;fi + +mkdir -p bin + # Run sanity check. ./sanityCheck diff --git a/compile-git+java-sanityCheck.sh b/compile-git+java-sanityCheck.sh index 1859d3ea7ba..7833bb97dad 100755 --- a/compile-git+java-sanityCheck.sh +++ b/compile-git+java-sanityCheck.sh @@ -1,5 +1,7 @@ #!/bin/bash -find bin/ >/dev/null 2>&1;if [ `echo $?` -gt 0 ];then mkdir bin/;fi + +mkdir -p bin + # Run sanity check. ./java+gitGrep-sanityCheck.sh -- GitLab