Skip to content

Commit b41dfcf

Browse files
committed
git-extra: override MSys icon for 32-bit MSys
This will help this developer keep better track of which SDK he is working in, important for bundling Git for Windows and compiling new MSys2 things. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent f1da954 commit b41dfcf

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

git-extra/PKGBUILD

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pkgver() {
1616
}
1717

1818
build() {
19-
printf '%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n' \
19+
printf '%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n' \
2020
"export LC_ALL=C" \
2121
"post_install () {" \
2222
"for dir in mingw32 mingw64; do test ! -d /\$dir || test -f /\$dir/etc/gitconfig || cat > /\$dir/etc/gitconfig <<\\GITCONFIG; done" \
@@ -32,6 +32,10 @@ build() {
3232
Server = https://dl.bintray.com/\$repo/pacman/\$arch\n\
3333
SigLevel = Optional\n\
3434
' etc/pacman.conf" \
35+
"test i686 != \$(uname -m) ||" \
36+
"case \"\$(md5sum.exe < /msys2.ico)\" in" \
37+
"292ad5cd*) cp /usr/share/git/msys2-32.ico /msys2.ico;;" \
38+
"esac" \
3539
"}" \
3640
"post_upgrade () {" \
3741
" post_install" \
@@ -41,8 +45,10 @@ SigLevel = Optional\n\
4145
package() {
4246
install -d -m755 $pkgdir/etc/profile.d
4347
install -d -m755 $pkgdir/usr/bin
48+
install -d -m755 $pkgdir/usr/share/git
4449
install -m644 $startdir/vimrc $pkgdir/etc
4550
install -m755 $startdir/vi $pkgdir/usr/bin
4651
install -m755 $startdir/git-prompt.sh $pkgdir/etc/profile.d
4752
install -m755 $startdir/aliases.sh $pkgdir/etc/profile.d
53+
install -m644 $startdir/msys2-32.ico $pkgdir/usr/share/git
4854
}

git-extra/git-extra.install

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ sed -i 's/^\(db_\(home\|shell\|gecos\): \)\([^w]\)/\1windows \3/' /etc/nsswitch.
2626
sed -i 's/^PS1=/#&/' /etc/bash.bashrc
2727
grep -q git-for-windows etc/pacman.conf ||
2828
sed -i -e '/^\[mingw32\]/i[git-for-windows]\nServer = https://dl.bintray.com/$repo/pacman/$arch\nSigLevel = Optional\n' etc/pacman.conf
29+
test i686 != $(uname -m) ||
30+
case "$(md5sum.exe < /msys2.ico)" in
31+
292ad5cd*) cp /usr/share/git/msys2-32.ico /msys2.ico;;
32+
esac
2933
}
3034
post_upgrade () {
3135
post_install

git-extra/msys2-32.ico

24.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)