ugit: remove the .py extension for git-ugit.py to make completion look nicer
[git-cola.git] / scripts / build-win32.sh
blob973ab019af545e8575951800a0fe03f4f453be95
1 #!/bin/sh
2 PREFIX=installroot
3 BINDIR=$PREFIX/bin
4 UGIT=$PREFIX/ugit
5 ICONDIR=$PREFIX/share/ugit/icons
6 QMDIR=$PREFIX/share/ugit/qm
7 DOCDIR=$PREFIX/share/doc/ugit
8 cd $(dirname $0)
9 cd ..
11 mkdir -p $BINDIR
12 mkdir -p $UGIT
13 mkdir -p $ICONDIR
14 mkdir -p $QMDIR
15 mkdir -p $DOCDIR
17 cp README $DOCDIR/README.txt
18 cp scripts/ugit-win32.sh $BINDIR
19 cp scripts/py2exe-* $BINDIR
20 cp ugit/git-ugit $BINDIR
21 cp ugit/*.py $UGIT
22 cp icons/* $ICONDIR
24 PYUIC4=$(which pyuic4)
25 if [ -z $PYUIC4 ] || [ ! -x $PYUIC4 ]; then
26 echo
27 echo "Could not find pyuic4."
28 echo "You need the pyqt4 developer tools in order to build ugit."
29 echo
30 else
31 for file in ui/*.ui; do
32 BASENAME=$(basename $file .ui)
33 $PYUIC4 -x $file -o $UGIT/$BASENAME.py
34 done
37 MSGFMT=$(which msgfmt)
38 if [ -z $MSGFMT ] || [ ! -x $MSGFMT ]; then
39 echo
40 echo "Could not find msgfmt."
41 echo "You need the msgfmt from GNU gettext in order to create"
42 echo "the translation files for ugit."
43 echo
44 else
45 for file in po/*.po; do
46 BASENAME=$(basename $file .po)
47 $MSGFMT --qt -o $QMDIR/$BASENAME.qm $file
48 done