]> Git repositories of Nishi - tewi.git/commitdiff
fix installer.sh
authorNishi <nishi@nishi.boats>
Thu, 3 Oct 2024 21:15:19 +0000 (21:15 +0000)
committerNishi <nishi@nishi.boats>
Thu, 3 Oct 2024 21:15:19 +0000 (21:15 +0000)
git-svn-id: file:///raid/svn-personal/tewi/trunk@251 8739d7e6-ffea-ec47-b151-bdff447c6205

Makefile
installer.sh

index 88cc56af54805c4ed25b6b28b508224757b521ee..c443b086d149217677066fea493ff1f592dc990d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -34,7 +34,7 @@ all: ./Server $(MODULE)
        $(MAKE) -C $@ $(FLAGS)
 
 ./README: ./README.tmpl ./Server/tw_version.h
-       sed "s/@VERSION@/`grep "define TW_VERSION" Server/tw_version.h | grep -Eo '"[^\]+' | sed 's/^"//g'`/g" ./README.tmpl > $@
+       sed "s/@VERSION@/`grep "define TW_VERSION" Server/tw_version.h | grep -Eom 1 '"[^\]+' | sed 's/^"//g'`/g" ./README.tmpl > $@
 
 install: all ./Tool/genconf ./Tool/itworks
        mkdir -p $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/lib/tewi $(DESTDIR)$(PREFIX)/etc $(DESTDIR)$(PREFIX)/www
@@ -48,7 +48,7 @@ format:
        clang-format --verbose -i `find ./Server ./Common ./Module ./Tool "(" -name "*.c" -or -name "*.h" ")" -and -not -name "strptime.*"` config.h
 
 get-version:
-       @grep "define TW_VERSION" Server/tw_version.h | grep -Eo '"[^\]+' | sed 's/^"//g'
+       @grep "define TW_VERSION" Server/tw_version.h | grep -Eom 1 '"[^\]+' | sed 's/^"//g'
 
 clean:
        $(MAKE) -C ./Server $(FLAGS) clean
index f2a840babb0b08a8e28667b9f06709dd98f8c7b6..bd8121ddf02fd8e13726096ec9abaf6de61fd02a 100755 (executable)
@@ -30,7 +30,7 @@ cp Server/tewi.exe tewi-service.exe
 cd Server
 ../Tool/genconf "C:/Tewi" modules dll > ../generated.conf
 ../Tool/itworks > ../itworks.html
-makensis -DVERSION=$VERSION install.nsi
+makensis -DVERSION=$VERSION install.nsi || fail
 cp install.exe ../install-nossl.exe
 rm -f tewi.exe tewi-service.exe
 cd ..
@@ -46,7 +46,7 @@ cp Server/tewi.exe tewi-service.exe
 cd Server
 ../Tool/genconf "C:/Tewi" modules dll > ../generated.conf
 ../Tool/itworks > ../itworks.html
-makensis -DVERSION=$VERSION install.nsi
+makensis -DVERSION=$VERSION install.nsi || fail
 cp install.exe ../install-ssl.exe
 rm -f tewi.exe tewi-service.exe
 cd ..