Skip to content
  • anarcat's avatar
    2a067e42
    port to bullseye: replace tempfile with mktemp · 2a067e42
    anarcat authored
    According to the tempfile(1) manpage:
    
           -d, --directory DIR
                  Place the file in DIR.
    
    ... but in mktemp(1):
    
           -d, --directory
                  create a directory, not a file
    
           [...]
    
           -p DIR, --tmpdir[=DIR]
                  interpret TEMPLATE relative to DIR; if DIR is not specified, use
                  $TMPDIR  if set, else /tmp.  With this option, TEMPLATE must not
                  be an absolute  name;  unlike  with  -t,  TEMPLATE  may  contain
                  slashes, but mktemp creates only the final component
    
    The mktemp usage is surprisingly obtuse, to be honest, but I think
    that's about it: -d is now -p. We don't specify a TEMPLATE so the
    remark about that shouldn't matter here.
    
    The script is still not "shellcheck-clean" (there's a warning about
    the trap), but it should fix the immediate problem, which is:
    
    Closes: #3
    2a067e42
    port to bullseye: replace tempfile with mktemp
    anarcat authored
    According to the tempfile(1) manpage:
    
           -d, --directory DIR
                  Place the file in DIR.
    
    ... but in mktemp(1):
    
           -d, --directory
                  create a directory, not a file
    
           [...]
    
           -p DIR, --tmpdir[=DIR]
                  interpret TEMPLATE relative to DIR; if DIR is not specified, use
                  $TMPDIR  if set, else /tmp.  With this option, TEMPLATE must not
                  be an absolute  name;  unlike  with  -t,  TEMPLATE  may  contain
                  slashes, but mktemp creates only the final component
    
    The mktemp usage is surprisingly obtuse, to be honest, but I think
    that's about it: -d is now -p. We don't specify a TEMPLATE so the
    remark about that shouldn't matter here.
    
    The script is still not "shellcheck-clean" (there's a warning about
    the trap), but it should fix the immediate problem, which is:
    
    Closes: #3
Loading