Skip to content

Commit

Permalink
install.sh: Use test -d for make_dir_recursive
Browse files Browse the repository at this point in the history
  • Loading branch information
mbargull committed Apr 7, 2021
1 parent 53d557b commit 2ccfecc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions install-template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,8 @@ append_to_file() {

make_dir_recursive() {
local _dir="$1"
# Skip if the last invocation of make_dir_recursive had the same argument
if ! [ "$_dir" = "${_make_dir_recursive_cached_key:-}" ]
if [ ! -d "$_dir" ]
then
_make_dir_recursive_cached_key="$_dir"
local _line="$ umask 022 && mkdir -p \"$_dir\""
umask 022 && mkdir -p "$_dir"
local _retval=$?
Expand Down

0 comments on commit 2ccfecc

Please sign in to comment.