mirror of
https://github.com/YunoHost-Apps/weblate_ynh.git
synced 2024-10-01 13:35:04 +02:00
run source in subshell and move pip installation after defining settings
This commit is contained in:
parent
4ee0fd1dff
commit
eb7bce723c
1 changed files with 18 additions and 11 deletions
|
@ -107,14 +107,6 @@ ynh_add_nginx_config
|
|||
# Create a system user
|
||||
ynh_system_user_create $app
|
||||
|
||||
#=================================================
|
||||
# PIP INSTALLATION
|
||||
#=================================================
|
||||
virtualenv ${final_path}/venv
|
||||
source ${final_path}/venv/bin/activate
|
||||
${final_path}/venv/bin/pip install Weblate==2.16
|
||||
${final_path}/venv/bin/pip install pytz python-bidi PyYaML Babel pyuca pylibravatar pydns
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC SETUP
|
||||
#=================================================
|
||||
|
@ -160,6 +152,17 @@ ynh_replace_string "__ADMINMAIL__" "$admin_mail" $final_path/weblate/settings.py
|
|||
ynh_replace_string "__DOMAIN__" "$domain" $final_path/weblate/settings.py
|
||||
ynh_replace_string "__KEY__" "$key" $final_path/weblate/settings.py
|
||||
|
||||
#=================================================
|
||||
# PIP INSTALLATION
|
||||
#=================================================
|
||||
virtualenv ${final_path}/venv
|
||||
#run source in a 'sub shell'
|
||||
(
|
||||
set +eu
|
||||
source ${final_path}/venv/bin/activate
|
||||
${final_path}/venv/bin/pip install Weblate==2.16
|
||||
${final_path}/venv/bin/pip install pytz python-bidi PyYaML Babel pyuca pylibravatar pydns
|
||||
)
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC SETUP Filling up the database
|
||||
|
@ -167,9 +170,13 @@ ynh_replace_string "__KEY__" "$key" $final_path/weblate/settings.py
|
|||
#==========================================
|
||||
echo "SPECIFIC SETUP Filling up the database"
|
||||
# set up database
|
||||
source ${final_path}/venv/bin/activate && weblate migrate --noinput --settings weblate.settings
|
||||
# generate static files
|
||||
source ${final_path}/venv/bin/activate && weblate collectstatic --noinput --settings weblate.settings
|
||||
(
|
||||
set +eu
|
||||
source ${final_path}/venv/bin/activate
|
||||
weblate migrate --noinput --settings weblate.settings
|
||||
# generate static files
|
||||
weblate collectstatic --noinput --settings weblate.settings
|
||||
)
|
||||
|
||||
#=================================================
|
||||
# SETUP CRON
|
||||
|
|
Loading…
Reference in a new issue