From f3fda22dfbb84a17cdd15c1ed4f0938cb43348a0 Mon Sep 17 00:00:00 2001 From: Vladislav Yarmak Date: Sat, 9 Mar 2019 23:06:11 +0200 Subject: [PATCH] guard from CRLF newlines --- patch.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/patch.sh b/patch.sh index 8ee7750..a29a714 100755 --- a/patch.sh +++ b/patch.sh @@ -1,6 +1,8 @@ #!/bin/bash - -set -euo pipefail +# halt on any error for safety and proper pipe handling +set -euo pipefail ; # <- this semicolon and comment make options apply +# even when script is corrupt by CRLF line terminators (issue #75) +# empty line must follow this comment for immediate fail with CRLF newlines backup_path="/opt/nvidia/libnvidia-encode-backup" silent_flag=''