python3 in Scripten erzwungen; locale mit try-except laden

This commit is contained in:
André Hilbig 2016-07-14 14:01:18 +02:00
parent 1c6107b49f
commit d8f6a5124d
4 changed files with 40 additions and 8 deletions

18
build
View File

@ -32,5 +32,19 @@ rm gitfile-info.dtx
mv output.dtx gitfile-info.dtx
latexmk -pdf gitfile-info.dtx
cd ..
cp -r gitfile-info_latest.zip gitfile-info/gitfile-info.dtx gitfile-info/gitfile-info.ins \
gitfile-info/README gitfile-info/gitfile-info.pdf
mkdir -v gitfile-info_latest
cp -v gitfile-info/gitfile-info.dtx gitfile-info_latest/
cp -v gitfile-info/gitfile-info.ins gitfile-info_latest/
mkdir -v gitfile-info_latest/doc/
cp -v gitfile-info/README gitfile-info_latest/doc/
cp -v gitfile-info/gitfile-info.pdf gitfile-info_latest/doc/
cp -v gitfile-info/post-merge.py gitfile-info_latest/doc/
cp -v gitfile-info/post-commit.py gitfile-info_latest/doc/
cp -v gitfile-info/gfi-run.py gitfile-info_latest/doc/
mv gitfile-info_latest /tmp/gitfile-info
WD=`echo $PWD`
cd /tmp
zip -r gitfile-info_latest.zip gitfile-info
mv gitfile-info_latest.zip $WD
rm -rvf /tmp/gitfile-info

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# -*- mode:python -*-
import os
@ -9,7 +9,13 @@ from git import Repo
import locale
# Locales for date set up to de_DE
# Please edit to you needs
locale.setlocale(locale.LC_ALL, 'de_DE')
try:
locale.setlocale(locale.LC_ALL, 'de_DE.utf8')
except:
try:
locale.setlocale(locale.LC_ALL, 'de_DE')
except:
print ("Fehler: bitte prüfen Sie das Ergebnis von 'locale -d' und fügen es in das Script ein.")
# set up the git repo
# path is the current working directory

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# -*- mode:python -*-
import os
@ -8,7 +8,13 @@ from git import Repo
import locale
# Locales for date set up to de_DE
# Please edit to you needs
locale.setlocale(locale.LC_ALL, 'de_DE')
try:
locale.setlocale(locale.LC_ALL, 'de_DE.utf8')
except:
try:
locale.setlocale(locale.LC_ALL, 'de_DE')
except:
print ("Fehler: bitte prüfen Sie das Ergebnis von 'locale -d' und fügen es in das Script ein.")
# set up the git repo
# path is the current working directory

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# -*- mode:python -*-
import os
@ -8,7 +8,13 @@ from git import Repo
import locale
# Locales for date set up to de_DE
# Please edit to you needs
locale.setlocale(locale.LC_ALL, 'de_DE')
try:
locale.setlocale(locale.LC_ALL, 'de_DE.utf8')
except:
try:
locale.setlocale(locale.LC_ALL, 'de_DE')
except:
print ("Fehler: bitte prüfen Sie das Ergebnis von 'locale -d' und fügen es in das Script ein.")
# set up the git repo
# path is the current working directory