./configure && $MAKE distcheck
# Recompress with libdeflate
-gzfile=$(ls wimlib-*.tar.gz | tail -1)
+gzfile=$(find . -name 'wimlib-*.tar.gz' | tail -1)
tarfile=${gzfile%.gz}
-libdeflate-gunzip $gzfile
-libdeflate-gzip -12 $tarfile
+libdeflate-gunzip "$gzfile"
+libdeflate-gzip -12 "$tarfile"
for arch in i686 x86_64; do
./tools/windows-build.sh --arch=$arch --include-docs --zip
#!/bin/sh
for fil in src/*.c programs/imagex.c; do
- sparse $fil -gcc-base-dir `gcc --print-file-name=` \
+ sparse "$fil" -gcc-base-dir "$(gcc --print-file-name=)" \
-D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -D_GNU_SOURCE \
-I. -Iinclude -Wbitwise -Wpointer-subtraction-blows
done
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)
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/" \