aboutsummaryrefslogtreecommitdiff
path: root/lib/util.bash
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util.bash')
-rw-r--r--lib/util.bash14
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" ]]