From 53813a3beb33d32b41bb208776897f3b8483e379 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Fri, 8 Jul 2011 15:51:04 +0200 Subject: [PATCH] Perform a more elegant check for msys-1.0.dll's MD5 Revert the change to copy-files.sh done in 678125b that was meant to fix the MD5 comparison done for msys-1.0.dll in /etc/profile, which was broken due to the way the file path is written since 42a6098. Instead, do not do a plain text comparison of MD5 sums, but let md5sum resolve the file path and do the comparison itself. Signed-off-by: Sebastian Schuberth --- etc/profile | 2 +- share/WinGit/copy-files.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/profile b/etc/profile index d2e4bf12..ddf7e5de 100644 --- a/etc/profile +++ b/etc/profile @@ -34,7 +34,7 @@ esac if test -f /etc/msys-1.0.dll.md5 then # if check succeeds, let's avoid checking again - test "$(md5sum /bin/msys-1.0.dll)" = "$(cat /etc/msys-1.0.dll.md5)" && + md5sum --status --check /etc/msys-1.0.dll.md5 && rm -f /etc/msys-1.0.dll.md5 || printf "\n\033[31mERROR: Your msys-1.0.dll is out-of-date!\033[m\n\n" fi diff --git a/share/WinGit/copy-files.sh b/share/WinGit/copy-files.sh index 01f535b8..9b7f0fad 100755 --- a/share/WinGit/copy-files.sh +++ b/share/WinGit/copy-files.sh @@ -81,7 +81,7 @@ fi && lib/{tcl,tk,dde,reg}* libexec/gnupg/) | tar xf - && cp $MSYSGITROOT/mingw/bin/hd2u.exe bin/dos2unix.exe && -(md5sum $MSYSGITROOT/bin/msys-1.0.dll | awk '{print $1, "*/bin/msys-1.0.dll"}') > etc/msys-1.0.dll.md5 && +md5sum $MSYSGITROOT/bin/msys-1.0.dll > etc/msys-1.0.dll.md5 && strip bin/{[a-fh-z],g[a-oq-z]}*.exe libexec/git-core/*.exe && cp $MSYSGITROOT/git/contrib/completion/git-completion.bash etc/ && cp $MSYSGITROOT/etc/termcap etc/ && -- 2.11.4.GIT