]> wimlib.net Git - wimlib/blobdiff - tools/update-version.sh
tools: address all shellcheck warnings
[wimlib] / tools / update-version.sh
index 7e108638fc8d90dc2f9d6a38c3829418d4cfb7ee..a62b3b890cf19e65883ac40fd29ac82693576736 100755 (executable)
@@ -10,7 +10,7 @@ fi
 oldmonth=$(head -1 doc/man1/wimcapture.1 | cut -d' ' -f4 | tr -d '"')
 oldyear=$(head -1 doc/man1/wimcapture.1 | cut -d' ' -f5 | tr -d '"')
 oldver=$(grep 'the library interface of wimlib' include/wimlib.h \
-        | egrep -o '[0-9]+\.[0-9]+\.[0-9]+')
+        | grep -E -o '[0-9]+\.[0-9]+\.[0-9]+')
 
 newver=$1
 newmajor=$(echo "$newver" | cut -d'.' -f1)
@@ -25,10 +25,10 @@ sed -i "s/$pat/This is wimlib version $newver ($newmonth $newyear)/" README
 
 sed -i "s/$oldver/$newver/" tools/get-version-number.sh README.WINDOWS
 
-sed -i -e 's/\(#define WIMLIB_MAJOR_VERSION[[:space:]]\+\)[[:digit:]]\+/\1'$newmajor'/' \
-       -e 's/\(#define WIMLIB_MINOR_VERSION[[:space:]]\+\)[[:digit:]]\+/\1'$newminor'/' \
-       -e 's/\(#define WIMLIB_PATCH_VERSION[[:space:]]\+\)[[:digit:]]\+/\1'$newpatch'/' \
-       -e 's/\(the library interface of wimlib \)'$oldver'/\1'$newver'/' \
+sed -i -e 's/\(#define WIMLIB_MAJOR_VERSION[[:space:]]\+\)[[:digit:]]\+/\1'"$newmajor"'/' \
+       -e 's/\(#define WIMLIB_MINOR_VERSION[[:space:]]\+\)[[:digit:]]\+/\1'"$newminor"'/' \
+       -e 's/\(#define WIMLIB_PATCH_VERSION[[:space:]]\+\)[[:digit:]]\+/\1'"$newpatch"'/' \
+       -e 's/\(the library interface of wimlib \)'"$oldver"'/\1'"$newver"'/' \
          include/wimlib.h
 
 sed -i -e "1s/$oldmonth $oldyear/$newmonth $newyear/;1s/wimlib $oldver/wimlib $newver/"        \