Created
June 5, 2013 11:37
-
-
Save gawel/5713275 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if ! [ -e seahub.sh ]; then | |
echo "This script must be run in the directory of the seahub.sh script" | |
exit 1 | |
fi | |
function check_python_executable () { | |
if [[ "$PYTHON" != "" && -x $PYTHON ]]; then | |
return 0 | |
fi | |
if which python2.7 2>/dev/null 1>&2; then | |
PYTHON=python2.7 | |
elif which python27 2>/dev/null 1>&2; then | |
PYTHON=python27 | |
elif which python2.6 2>/dev/null 1>&2; then | |
PYTHON=python2.6 | |
elif which python26 2>/dev/null 1>&2; then | |
PYTHON=python26 | |
else | |
echo | |
echo "Can't find a python executable of version 2.6 or above in PATH" | |
echo "Install python 2.6+ before continue." | |
echo "Or if you installed it in a non-standard PATH, set the PYTHON enviroment varirable to it" | |
echo | |
exit 1 | |
fi | |
} | |
SCRIPT=$(readlink -f "$0") | |
INSTALLPATH=$(dirname "${SCRIPT}") | |
po=https://raw.github.com/bearstech/seahub/488d6d42b2fb4307ca4a87164346a3681639d1be/locale/fr/LC_MESSAGES/django.po | |
wget --no-check-certificate \ | |
-O $INSTALLPATH/seahub/locale/fr/LC_MESSAGES/django.po \ | |
$po | |
export PYTHONPATH=$INSTALLPATH/seafile/lib/python2.6/site-packages:$INSTALLPATH/seafile/lib64/python2.6/site-packages:$INSTALLPATH/seahub/thirdpart:$PYTHONPATH | |
cd $INSTALLPATH/seahub | |
check_python_executable | |
$PYTHON manage.py compilemessages -l fr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment