-
Notifications
You must be signed in to change notification settings - Fork 0
/
translate.hook
executable file
·28 lines (24 loc) · 1.13 KB
/
translate.hook
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
. /devel/bin/common.hook
echo "Изменился $PROG"
DSTLIB=/usr/lib/$PYTHON_VER/site-packages/$PROG
echo "Копирую в $DSTLIB"
mkdir -p $ro_image/$DSTLIB
rsync $RSYNC_OPTS $APP/src/$PROG/* $ro_image/$DSTLIB
# установка переводов
BASE_DJANGO_PATH='/usr/local/www/base/'
BILLING_DJANGO_PATH='/usr/local/www/sites/'
DAEMONS_PATH='/usr/lib/python2.7/site-packages/daemons/'
LOCALE_PATH='locale/en/LC_MESSAGES/'
APP=${APP%/*}
if [ "${APP##*/}" = 'asr_billing' ]; then
mkdir -p $ro_image/$DAEMONS_PATH$LOCALE_PATH
rsync $RSYNC_OPTS $APP/src/$PROG/daemons.* $ro_image/$DAEMONS_PATH$LOCALE_PATH
mkdir -p $ro_image/$BILLING_DJANGO_PATH$LOCALE_PATH
rsync $RSYNC_OPTS $APP/src/$PROG/admin_billing.mo $ro_image/$BILLING_DJANGO_PATH$LOCALE_PATH/django.mo
rsync $RSYNC_OPTS $APP/src/$PROG/admin_billing.po $ro_image/$BILLING_DJANGO_PATH$LOCALE_PATH/django.po
else
mkdir -p $ro_image/$BASE_DJANGO_PATH$LOCALE_PATH
rsync $RSYNC_OPTS $APP/src/$PROG/base.mo $ro_image/$BASE_DJANGO_PATH$LOCALE_PATH/django.mo
rsync $RSYNC_OPTS $APP/src/$PROG/base.po $ro_image/$BASE_DJANGO_PATH$LOCALE_PATH/django.po
fi