]> git.sesse.net Git - ffmpeg/commitdiff
compat/cuda/ptx2c: don't drop final newline
authorTimo Rothenpieler <timo@rothenpieler.org>
Fri, 24 May 2019 17:23:39 +0000 (19:23 +0200)
committerTimo Rothenpieler <timo@rothenpieler.org>
Fri, 24 May 2019 17:23:39 +0000 (19:23 +0200)
compat/cuda/ptx2c.sh

index 5ccabbf56f1e0c3f584729f753fd48a4c6c31062..0750e7a3b78ebacca9156f13541891287be1a34b 100755 (executable)
@@ -27,7 +27,7 @@ IN="$2"
 NAME="$(basename "$IN" | sed 's/\..*//')"
 
 printf "const char %s_ptx[] = \\" "$NAME" > "$OUT"
-while read LINE
+while IFS= read -r LINE
 do
     printf "\n\t\"%s\\\n\"" "$(printf "%s" "$LINE" | sed -e 's/\r//g' -e 's/["\\]/\\&/g')" >> "$OUT"
 done < "$IN"