diff options
author | Patrick Spek <p.spek@tyil.nl> | 2020-03-25 16:28:00 +0100 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2020-03-25 16:28:00 +0100 |
commit | 4082a07611d1eff4556296d99c985ee068c15acc (patch) | |
tree | e88c6a2ea586ef44f83be2b2050ceedee691ef67 /lib/util.bash | |
parent | 137b98ad8e0e03e1e55135fca7cece211e09cb2c (diff) |
Drop tmpfile's getopts code
Having this broke installation of modules on FreeBSD, and seeing as it's
not used in the current codebase, the safest option is to just drop it.
Diffstat (limited to 'lib/util.bash')
-rw-r--r-- | lib/util.bash | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/lib/util.bash b/lib/util.bash index c2d717b..1cf84f4 100644 --- a/lib/util.bash +++ b/lib/util.bash @@ -128,21 +128,9 @@ tmpdir() { # however, it will apply additional checks to ensure everything is going # correctly, and the files will be cleaned up automatically at the end. tmpfile() { - local OPTIND - local extension="tmp" local file - while getopts ":x:" opt - do - case "$opt" in - x) extension=$OPTARG ;; - *) alert "Unused argument specified: $opt" ;; - esac - done - - shift $(( OPTIND -1 )) - - file="$(mktemp --suffix ".$extension")" + file="$(mktemp)" # Ensure the file was created succesfully if [[ ! -f "$file" ]] |