Browse Source

Keep spaces around `=` when replacing version in mkit.ini

Alois Mahdal 9 years ago
parent
commit
81225bbd8f
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/include/ini.sh

+ 1
- 1
src/include/ini.sh View File

136
             if      ($done) { print; next; }
136
             if      ($done) { print; next; }
137
             elsif   (m/\[project\]/) { $hit++; print; next; }
137
             elsif   (m/\[project\]/) { $hit++; print; next; }
138
             elsif   (m/\[/) { $hit = 0; print; next; }
138
             elsif   (m/\[/) { $hit = 0; print; next; }
139
-            elsif   ($hit) { s/\bversion\b *=.*/version = $ARGV[0]/ and $done++; print; }
139
+            elsif   ($hit) { s/\bversion\b( *)=( *).*/version$1=$2$ARGV[0]/ and $done++; print; }
140
             else { print; next; }
140
             else { print; next; }
141
         }
141
         }
142
     ' "$version" >"$tmp" || die "failed to update version in mkit.ini"
142
     ' "$version" >"$tmp" || die "failed to update version in mkit.ini"