mirror of
https://github.com/YunoHost-Apps/phpmyadmin_ynh.git
synced 2024-09-03 19:56:46 +02:00
Fix missing dependencies
Fix the error "File ./vendor/autoload.php missing or not readable."
This commit is contained in:
parent
b566372e18
commit
09271bfda1
3 changed files with 57 additions and 2 deletions
35
scripts/_common.sh
Normal file
35
scripts/_common.sh
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
# COMPOSER
|
||||||
|
# =============================================================================
|
||||||
|
|
||||||
|
# Execute a composer command from a given directory
|
||||||
|
# usage: composer_exec workdir COMMAND [ARG ...]
|
||||||
|
exec_composer() {
|
||||||
|
local workdir=$1
|
||||||
|
shift 1
|
||||||
|
|
||||||
|
COMPOSER_HOME="${workdir}/.composer" \
|
||||||
|
php "${workdir}/composer.phar" $@ \
|
||||||
|
-d "${workdir}" --quiet --no-interaction
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install and initialize Composer in the given directory
|
||||||
|
# usage: init_composer destdir
|
||||||
|
init_composer() {
|
||||||
|
local destdir=$1
|
||||||
|
|
||||||
|
# install composer
|
||||||
|
curl -sS https://getcomposer.org/installer \
|
||||||
|
| COMPOSER_HOME="${destdir}/.composer" \
|
||||||
|
php -- --quiet --install-dir="$destdir" \
|
||||||
|
|| ynh_die "Unable to install Composer"
|
||||||
|
|
||||||
|
# install composer.json
|
||||||
|
cp "${destdir}/composer.json-dist" "${destdir}/composer.json"
|
||||||
|
|
||||||
|
# update dependencies to create composer.lock
|
||||||
|
exec_composer "$destdir" install --no-dev \
|
||||||
|
|| ynh_die "Unable to update Roundcube core dependencies"
|
||||||
|
}
|
|
@ -6,7 +6,7 @@
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -114,6 +114,16 @@ cp ../conf/config.inc.php $final_path
|
||||||
# Recalculate and store the config file checksum into the app settings
|
# Recalculate and store the config file checksum into the app settings
|
||||||
ynh_store_file_checksum "$final_path/config.inc.php"
|
ynh_store_file_checksum "$final_path/config.inc.php"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# INSTALL DEPENDENCIES
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# Install composer
|
||||||
|
init_composer "$final_path"
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
exec_composer update --no-dev
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -130,6 +130,16 @@ cp ../conf/config.inc.php $final_path
|
||||||
# Recalculate and store the config file checksum into the app settings
|
# Recalculate and store the config file checksum into the app settings
|
||||||
ynh_store_file_checksum "$final_path/config.inc.php"
|
ynh_store_file_checksum "$final_path/config.inc.php"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# INSTALL DEPENDENCIES
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# Install composer
|
||||||
|
init_composer "$final_path"
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
exec_composer update --no-dev
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue