From 925d0d787b547c509fa99c8cb67611994d32fa95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Sat, 30 Jun 2018 16:52:00 +0200 Subject: [PATCH] Switch from tempfile to mktemp, as tempfile is deprecated --- test/bochs.sh | 4 ++-- test/virtualbox.sh | 2 +- utils/ansi-screenshots/ansi_screenshot.sh | 2 +- utils/ansi-screenshots/to_ansi.sh | 16 ++++++++-------- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/test/bochs.sh b/test/bochs.sh index e983ff6..5c5e728 100755 --- a/test/bochs.sh +++ b/test/bochs.sh @@ -3,14 +3,14 @@ set -e os_file="example-os/os.sh" -bochsrc="$(tempfile)" +bochsrc="$(mktemp)" cat > "$bochsrc" < "$bochscontinue" bochs -qf "$bochsrc" < "$bochscontinue" & diff --git a/test/virtualbox.sh b/test/virtualbox.sh index 0a5d3ba..8b46042 100755 --- a/test/virtualbox.sh +++ b/test/virtualbox.sh @@ -2,7 +2,7 @@ set -e os_file="example-os/os.sh" -img_file="$(tempfile --suffix=".img")" +img_file="$(mktemp --suffix=".img")" vbox_dir="vbox_$(date +%s)-$$" vmname="automatic-os-test-$(date +%s)-$$" diff --git a/utils/ansi-screenshots/ansi_screenshot.sh b/utils/ansi-screenshots/ansi_screenshot.sh index 07155c2..e1c01a5 100755 --- a/utils/ansi-screenshots/ansi_screenshot.sh +++ b/utils/ansi-screenshots/ansi_screenshot.sh @@ -1,6 +1,6 @@ #!/bin/sh -screenshot="$(tempfile --suffix=".png")" +screenshot="$(mktemp --suffix=".png")" scrot "$screenshot" "$(dirname "$0")/to_ansi.sh" "$screenshot" 107 diff --git a/utils/ansi-screenshots/to_ansi.sh b/utils/ansi-screenshots/to_ansi.sh index 075a606..ffe8d72 100755 --- a/utils/ansi-screenshots/to_ansi.sh +++ b/utils/ansi-screenshots/to_ansi.sh @@ -3,14 +3,14 @@ file="$1" width="$2" -mini_png="$(tempfile --suffix=".png")" -colors_gif="$(tempfile --suffix=".gif")" -indexed_gif="$(tempfile --suffix=".gif")" -indexed_pgm="$(tempfile --suffix=".pgm")" -odd_lines="$(tempfile --suffix=".odd")" -even_lines="$(tempfile --suffix=".even")" -odd_lines_px="$(tempfile --suffix=".odd.px")" -even_lines_px="$(tempfile --suffix=".even.px")" +mini_png="$(mktemp --suffix=".png")" +colors_gif="$(mktemp --suffix=".gif")" +indexed_gif="$(mktemp --suffix=".gif")" +indexed_pgm="$(mktemp --suffix=".pgm")" +odd_lines="$(mktemp --suffix=".odd")" +even_lines="$(mktemp --suffix=".even")" +odd_lines_px="$(mktemp --suffix=".odd.px")" +even_lines_px="$(mktemp --suffix=".even.px")" colors=(78,78,78 255,108,96 0,170,0 288,288,182 150,203,254 255,115,253 85,255,255 238,238,238 124,124,124 255,155,147 177,253,121 255,255,145 181,220,254 255,156,254 85,255,255 255,255,255) args=()