Commit 3db0820 1 parent d930be0 commit 3db0820 Copy full SHA for 3db0820
File tree 5 files changed +58
-3
lines changed
5 files changed +58
-3
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ pkgver() {
18
18
build () {
19
19
test $startdir /$pkgname .install -nt $startdir /$pkgname .install.in ||
20
20
sed -e " /^@@GITCONFIG@@$/r $startdir /gitconfig" -e " /^@@GITCONFIG@@$/d" \
21
+ -e " /^@@GITATTRIBUTES@@$/r $startdir /gitattributes" \
22
+ -e " /^@@GITATTRIBUTES@@$/d" \
21
23
< $startdir /$pkgname .install.in > $startdir /$pkgname .install
22
24
23
25
gcc -o create-shortcut.exe $startdir /create-shortcut.c -luuid -lole32
@@ -38,6 +40,7 @@ package() {
38
40
install -d -m755 $pkgdir /usr/bin
39
41
install -d -m755 $pkgdir /usr/share/git
40
42
install -d -m755 $pkgdir /$mingwdir /bin
43
+ install -d -m755 $pkgdir /$mingwdir /etc
41
44
install -m644 $startdir /inputrc $pkgdir /etc
42
45
install -m644 $startdir /vimrc $pkgdir /etc
43
46
install -m755 $startdir /vi $pkgdir /usr/bin
@@ -50,4 +53,7 @@ package() {
50
53
install -m755 $startdir /bash_profile.sh $pkgdir /etc/profile.d
51
54
install -m644 $startdir /msys2-32.ico $pkgdir /usr/share/git
52
55
install -m644 $startdir /99-post-install-cleanup.post $pkgdir /etc/post-install
56
+ install -m755 $startdir /astextplain $pkgdir /$mingwdir /bin
57
+ install -m755 $startdir /gitconfig $pkgdir /$mingwdir /etc
58
+ install -m755 $startdir /gitattributes $pkgdir /$mingwdir /etc
53
59
}
Original file line number Diff line number Diff line change
1
+ #! /bin/sh -e
2
+ # minimalistic replacement for `run-mailcap --action=cat <file>`
3
+
4
+ if test " $# " ! = 1 ; then
5
+ echo " Usage: astextplain <file>" 1>&2
6
+ exit 1
7
+ fi
8
+
9
+ # XXX output encoding (UTF-8) hardcoded
10
+ case " $1 " in
11
+ * .doc | * .DOC | * .dot | * .DOT)
12
+ antiword -m UTF-8 " $1 " || cat " $1 "
13
+ ;;
14
+ * .docx | * .DOCX)
15
+ docx2txt.pl " $1 " -
16
+ ;;
17
+ * .pdf | * .PDF)
18
+ pdftotext -layout " $1 " -enc UTF-8 -
19
+ ;;
20
+ # TODO add rtf support
21
+ * .rtf | * .RTF)
22
+ cat " $1 "
23
+ ;;
24
+ * )
25
+ echo " E: unsupported filetype $1 " 1>&2
26
+ exit 1
27
+ ;;
28
+ esac
29
+
30
+ exit 0
Original file line number Diff line number Diff line change @@ -8,6 +8,11 @@ post_install () {
8
8
cat > /$dir/etc/gitconfig <<\GITCONFIG
9
9
@@GITCONFIG@@
10
10
GITCONFIG
11
+ test ! -d /$dir ||
12
+ test -f /$dir/etc/gitattributes ||
13
+ cat > /$dir/etc/gitattributes <<\GITATTRIBUTES
14
+ @@GITATTRIBUTES@@
15
+ GITATTRIBUTES
11
16
done
12
17
13
18
grep -q '^db_home: env windows' /etc/nsswitch.conf ||
Original file line number Diff line number Diff line change
1
+ *.doc diff=astextplain
2
+ *.DOC diff=astextplain
3
+ *.docx diff=astextplain
4
+ *.DOCX diff=astextplain
5
+ *.dot diff=astextplain
6
+ *.DOT diff=astextplain
7
+ *.pdf diff=astextplain
8
+ *.PDF diff=astextplain
9
+ *.rtf diff=astextplain
10
+ *.RTF diff=astextplain
Original file line number Diff line number Diff line change @@ -28,14 +28,15 @@ pacman_list () {
28
28
}
29
29
30
30
# Packages that have been added after Git SDK 1.0.0 was released...
31
- pacman -S --needed --noconfirm mingw-w64-$ARCH -connect git-flow >&2 ||
31
+ pacman -S --needed --noconfirm mingw-w64-$ARCH -connect git-flow unzip docx2txt \
32
+ mingw-w64-$ARCH -antiword >&2 ||
32
33
die " Could not install required packages"
33
34
34
35
pacman_list mingw-w64-$ARCH -git mingw-w64-$ARCH -git-doc-html \
35
36
git-extra ncurses mintty vim openssh winpty \
36
37
sed awk less grep gnupg tar findutils coreutils diffutils patch \
37
38
dos2unix which subversion mingw-w64-$ARCH -tk \
38
- mingw-w64-$ARCH -connect git-flow " $@ " |
39
+ mingw-w64-$ARCH -connect git-flow docx2txt mingw-w64- $ARCH -antiword " $@ " |
39
40
grep -v -e ' \.[acho]$' -e ' \.l[ao]$' -e ' /aclocal/' \
40
41
-e ' /man/' -e ' /pkgconfig/' -e ' /emacs/' \
41
42
-e ' ^/usr/lib/python' -e ' ^/usr/lib/ruby' \
@@ -71,7 +72,7 @@ grep --perl-regexp -v -e '^/usr/(lib|share)/terminfo/(?!.*/(cygwin|dumb|xterm.*)
71
72
sed ' s/^\///'
72
73
73
74
test -z " $PACKAGE_VERSIONS_FILE " ||
74
- pacman -Q filesystem dash rebase util-linux >> " $PACKAGE_VERSIONS_FILE "
75
+ pacman -Q filesystem dash rebase util-linux unzip >> " $PACKAGE_VERSIONS_FILE "
75
76
76
77
cat << EOF
77
78
etc/profile
@@ -89,4 +90,7 @@ usr/bin/dash.exe
89
90
usr/bin/rebase.exe
90
91
usr/bin/rebaseall
91
92
usr/bin/getopt.exe
93
+ mingw$BITNESS /bin/astextplain
94
+ mingw$BITNESS /etc/gitattributes
95
+ usr/bin/unzip.exe
92
96
EOF
You can’t perform that action at this time.
0 commit comments