]> git.sesse.net Git - ffmpeg/blobdiff - compat/cuda/ptx2c.sh
compat/cuda/ptx2c: don't drop final newline
[ffmpeg] / 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"