Skip to content

Commit 2dc0892

Browse files
committed
git-extra: automatically mount /sdk32 and /sdk64 in the SDK
When 32-bit and 64-bit SDKs are installed next to each other, it is convenient to be able to call git pull /sdk32$(pwd) master to merge quickly the work that has been performed in the other SDK. So let's make that easy. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent fc47c33 commit 2dc0892

File tree

3 files changed

+28
-3
lines changed

3 files changed

+28
-3
lines changed

git-extra/PKGBUILD

+5-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ source=('inputrc'
3030
'bash_profile.sh'
3131
'msys2-32.ico'
3232
'99-post-install-cleanup.post'
33-
'astextplain')
33+
'astextplain'
34+
'git-sdk.sh')
3435
md5sums=('3fab57079f0322efe256e95fe29d516f'
3536
'e7ad03fffc29e619e402dbd5ec9ef74c'
3637
'bfb591886b2a28af3334521e71198b74'
@@ -47,7 +48,8 @@ md5sums=('3fab57079f0322efe256e95fe29d516f'
4748
'fc645b2d3dd6a7187db75a5ed9b88bae'
4849
'a8feb7ee2fa91bb179478f099444746f'
4950
'bdeb6046510aa1a6cd76e7f86673aa3f'
50-
'6a1087428cd23aa7f6063d1a592cac38')
51+
'6a1087428cd23aa7f6063d1a592cac38'
52+
'593dbce30c442529b4351650f4422b6e')
5153

5254
prepare() {
5355
test $startdir/$pkgname.install -nt $startdir/$pkgname.install.in &&
@@ -87,6 +89,7 @@ package() {
8789
install -m755 aliases.sh $pkgdir/etc/profile.d
8890
install -m755 env.sh $pkgdir/etc/profile.d
8991
install -m755 bash_profile.sh $pkgdir/etc/profile.d
92+
install -m755 git-sdk.sh $pkgdir/etc/profile.d
9093
install -m644 msys2-32.ico $pkgdir/usr/share/git
9194
install -m644 99-post-install-cleanup.post $pkgdir/etc/post-install
9295
install -m755 astextplain $pkgdir/usr/bin

git-extra/git-sdk.sh

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/sh
2+
3+
# This profile.d script configures a few things for the Git SDK (but is
4+
# excluded from the end user-facing Git for Windows).
5+
6+
# If both 32-bit and 64-bit Git for Windows SDK is installed next to each other,
7+
# using the default directory names, mount them as /sdk32 and /sdk64,
8+
# respectively, to make it easier to interact between the two.
9+
10+
rootdir="$(cygpath -w /)" &&
11+
case "$rootdir" in
12+
*\\git-sdk-32|*\\git-sdk-64)
13+
otherarch=$((96-${rootdir##*-})) &&
14+
if test ! -d /sdk$otherarch
15+
then
16+
othersdk="${rootdir%??}$otherarch"
17+
test ! -d "$othersdk" ||
18+
mount "$othersdk" /sdk$otherarch 2>/dev/null
19+
fi
20+
;;
21+
esac

make-file-list.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ grep -v -e '\.[acho]$' -e '\.l[ao]$' -e '/aclocal/' \
7272
-e '^/usr/share.*/magic$' \
7373
-e '^/usr/share/perl5/core_perl/Unicode/Collate/Locale/' \
7474
-e '^/usr/share/perl5/core_perl/pods/' \
75-
-e '^/usr/share/vim/vim74/lang/' |
75+
-e '^/usr/share/vim/vim74/lang/' \
76+
-e '^/etc/profile.d/git-sdk.sh$' |
7677
if test -n "$WITH_L10N"
7778
then
7879
cat

0 commit comments

Comments
 (0)