diff --git a/.gitattributes b/.gitattributes
index 258cd31901bb65d37fe492418473c9015365a41f..e272f6d62498d3e5be5840e5aa500e345e6d451b 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -3,3 +3,5 @@
 
 # Convert to native line endings on checkout.
 *.ref text
+# Shell scripts need Linux line endings.
+*.sh eol=lf