commit aa0796d9bc928faa8b502281e73632c75ebf90a7
parent e20e66165a29a4786f6ad55526a86e92f0c64d72
Author: finwo <finwo@pm.me>
Date: Wed, 18 Oct 2023 00:14:24 +0200
Fix newlines while reading ini files
Diffstat:
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/dist/dep b/dist/dep
@@ -69,6 +69,9 @@ function ini_foreach {
SECTION=
while read line; do
+ # Fix newlines
+ line=$(echo $line | dos2unix)
+
# Remove surrounding whitespace
line=${line##*( )} # From the beginning
line=${line%%*( )} # From the end
diff --git a/src/util/ini.sh b/src/util/ini.sh
@@ -17,6 +17,9 @@ function ini_foreach {
SECTION=
while read line; do
+ # Fix newlines
+ line=$(echo $line | dos2unix)
+
# Remove surrounding whitespace
line=${line##*( )} # From the beginning
line=${line%%*( )} # From the end