diff --git a/hwconfig/DT-DX.override b/hwconfig/DT-DX.override index 085b904..1e6ba75 100644 --- a/hwconfig/DT-DX.override +++ b/hwconfig/DT-DX.override @@ -43,6 +43,4 @@ LongPressTimeout=400 EncoderEnabled=1 EncoderPinClock=6 -EncoderPinData=5 - -# Do not delete this line +EncoderPinData=5 \ No newline at end of file diff --git a/hwconfig/customize.sh b/hwconfig/customize.sh index 8a6f95f..7426d96 100755 --- a/hwconfig/customize.sh +++ b/hwconfig/customize.sh @@ -16,5 +16,14 @@ for file in *.override; do sed -i "s/^$key=.*/$key=$value/" "$name_of_ini_file" fi done < "$file" + + # Process the last line of the override file separately, if it doesn't end with a newline + if [ -n "$key" ]; then + value=$(echo "$value" | tr -d '\r') + if [ -n "$value" ]; then + sed -i "s/^$key=.*/$key=$value/" "$name_of_ini_file" + fi + fi + echo "Created $name_of_ini_file" done