commit:     4fe6f1a7211fefe3e6817fb7f2a40504704fccc8
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Apr  6 19:02:20 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Apr  6 19:03:32 2019 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=4fe6f1a7

Remove `mkdir $TEMP` call which is no longer needed

...since we used `mktemp` before which already created that
directory.

Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 gen_cmdline.sh | 2 +-
 genkernel      | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/gen_cmdline.sh b/gen_cmdline.sh
index be04cdb..ceaf212 100755
--- a/gen_cmdline.sh
+++ b/gen_cmdline.sh
@@ -591,7 +591,7 @@ parse_cmdline() {
                        then
                                mkdir -p "${TMPDIR}" || gen_die "Failed to 
create '${TMPDIR}'!"
                        fi
-                       TEMP=$(mktemp -d -p "${TMPDIR}" gk.XXXXXXXX)
+                       TEMP=$(mktemp -d -p "${TMPDIR}" gk.XXXXXXXX 2>/dev/null)
                        [ -z "${TEMP}" ] && gen_die "mktemp failed!"
                        print_info 2 "TMPDIR: ${TMPDIR}"
                        print_info 2 "TEMP: ${TEMP}"

diff --git a/genkernel b/genkernel
index 5337833..bb936a3 100755
--- a/genkernel
+++ b/genkernel
@@ -49,7 +49,7 @@ then
        mkdir -p "${TMPDIR}" || gen_die "Failed to create '${TMPDIR}'!"
 fi
 
-TEMP=$(mktemp -d -p "${TMPDIR}" gk.XXXXXXXX)
+TEMP=$(mktemp -d -p "${TMPDIR}" gk.XXXXXXXX 2>/dev/null)
 [ -z "${TEMP}" ] && gen_die "mktemp failed!"
 
 trap_cleanup(){
@@ -156,8 +156,6 @@ determine_config_file
 
 set_kernel_arch
 
-[ ! -f "${TEMP}" ] && mkdir "${TEMP}" || gen_die "Failed to create '${TEMP}'!"
-
 setup_cache_dir
 
 check_distfiles

Reply via email to