Skip to content

Commit 6a3b9aa

Browse files
committed
please.sh upgrade git-lfs: fix sed expression to update folder
When the folder is not the top-level directory, it contains slashes, which have special meaning in sed expressions and need to be escaped. This problem did not occur before because `upgrade git-lfs` was only used to upgrade to version 2.2.0 so far, and that version's .zip files contained the git-lfs.exe files at the top-level directory. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent ce62f47 commit 6a3b9aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

please.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2352,10 +2352,10 @@ upgrade () { # <package>
23522352
sha256sum -c - &&
23532353
dir32="$(unzip -l $zip32 |
23542354
sed -n 's/^.\{28\} *\(.*\)\/\?git-lfs\.exe/\1/p' |
2355-
sed 's/^$/./')" &&
2355+
sed -e 's/^$/./' -e 's/\//\\&/g')" &&
23562356
dir64="$(unzip -l $zip64 |
23572357
sed -n 's/^.\{28\} *\(.*\)\/\?git-lfs\.exe/\1/p' |
2358-
sed 's/^$/./')" &&
2358+
sed -e 's/^$/./' -e 's/\//\\&/g')" &&
23592359
s1='s/\(folder=\)[^\n]*/\1' &&
23602360
s2='s/\(sha256sum=\)[0-9a-f]*/\1'
23612361
sed -i -e "s/^\\(pkgver=\\).*/\\1$version/" \

0 commit comments

Comments
 (0)