diff --git a/ALL_README.md b/ALL_README.md
new file mode 100644
index 0000000..8938aae
--- /dev/null
+++ b/ALL_README.md
@@ -0,0 +1,8 @@
+# All available README files by language
+
+- [Read the README in English](README.md)
+- [Lee el README en español](README_es.md)
+- [Irakurri README euskaraz](README_eu.md)
+- [Lire le README en français](README_fr.md)
+- [Le o README en galego](README_gl.md)
+- [阅读中文(简体)的 README](README_zh_Hans.md)
diff --git a/README.md b/README.md
index cb8b5a7..2fb1482 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
@@ -9,10 +9,10 @@ It shall NOT be edited by hand.
[](https://install-app.yunohost.org/?app=h5ai)
-*[Lire ce readme en français.](./README_fr.md)*
+*[Read this README in other languages.](./ALL_README.md)*
-> *This package allows you to install h5ai quickly and simply on a YunoHost server.
-If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
+> *This package allows you to install h5ai quickly and simply on a YunoHost server.*
+> *If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.*
## Overview
@@ -25,7 +25,7 @@ Some of the optional features are: file sorting, different view modes, localizat
**Shipped version:** 0.30.0~ynh10
-**Demo:** https://larsjung.de/h5ai/demo/
+**Demo:**
## Screenshots
@@ -33,19 +33,19 @@ Some of the optional features are: file sorting, different view modes, localizat
## Documentation and resources
-* Official app website:
-* Official admin documentation:
-* Upstream app code repository:
-* YunoHost Store:
-* Report a bug:
+- Official app website:
+- Official admin documentation:
+- Upstream app code repository:
+- YunoHost Store:
+- Report a bug:
## Developer info
-Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing).
+Please send your pull request to the [`testing` branch](https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing).
-To try the testing branch, please proceed like that.
+To try the `testing` branch, please proceed like that:
-``` bash
+```bash
sudo yunohost app install https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing --debug
or
sudo yunohost app upgrade h5ai -u https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing --debug
diff --git a/README_es.md b/README_es.md
new file mode 100644
index 0000000..8926bbb
--- /dev/null
+++ b/README_es.md
@@ -0,0 +1,54 @@
+
+
+# h5ai para Yunohost
+
+[](https://dash.yunohost.org/appci/app/h5ai)  
+
+[](https://install-app.yunohost.org/?app=h5ai)
+
+*[Leer este README en otros idiomas.](./ALL_README.md)*
+
+> *Este paquete le permite instalarh5ai rapidamente y simplement en un servidor YunoHost.*
+> *Si no tiene YunoHost, visita [the guide](https://yunohost.org/install) para aprender como instalarla.*
+
+## Descripción general
+
+h5ai is a modern file indexer for HTTP web servers with focus on your files. Directories are displayed in a appealing way and browsing them is enhanced by different views, a breadcrumb and a tree overview.
+
+### Features
+
+Some of the optional features are: file sorting, different view modes, localization, a breadcrumb, a tree view, custom headers and footers, file filter and search, folder sizes, auto refresh, packaged download, QR codes, thumbnails, file previews
+
+
+**Versión actual:** 0.30.0~ynh10
+
+**Demo:**
+
+## Capturas
+
+
+
+## Documentaciones y recursos
+
+- Sitio web oficial:
+- Documentación administrador oficial:
+- Repositorio del código fuente oficial de la aplicación :
+- Catálogo YunoHost:
+- Reportar un error:
+
+## Información para desarrolladores
+
+Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing
+
+Para probar la rama `testing`, sigue asÍ:
+
+```bash
+sudo yunohost app install https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing --debug
+o
+sudo yunohost app upgrade h5ai -u https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing --debug
+```
+
+**Mas informaciones sobre el empaquetado de aplicaciones:**
diff --git a/README_eu.md b/README_eu.md
new file mode 100644
index 0000000..29d59ca
--- /dev/null
+++ b/README_eu.md
@@ -0,0 +1,54 @@
+
+
+# h5ai YunoHost-erako
+
+[](https://dash.yunohost.org/appci/app/h5ai)  
+
+[](https://install-app.yunohost.org/?app=h5ai)
+
+*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)*
+
+> *Pakete honek h5ai YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.*
+> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.*
+
+## Aurreikuspena
+
+h5ai is a modern file indexer for HTTP web servers with focus on your files. Directories are displayed in a appealing way and browsing them is enhanced by different views, a breadcrumb and a tree overview.
+
+### Features
+
+Some of the optional features are: file sorting, different view modes, localization, a breadcrumb, a tree view, custom headers and footers, file filter and search, folder sizes, auto refresh, packaged download, QR codes, thumbnails, file previews
+
+
+**Paketatutako bertsioa:** 0.30.0~ynh10
+
+**Demoa:**
+
+## Pantaila-argazkiak
+
+
+
+## Dokumentazioa eta baliabideak
+
+- Aplikazioaren webgune ofiziala:
+- Administratzaileen dokumentazio ofiziala:
+- Jatorrizko aplikazioaren kode-gordailua:
+- YunoHost Denda:
+- Eman errore baten berri:
+
+## Garatzaileentzako informazioa
+
+Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing).
+
+`testing` abarra probatzeko, ondorengoa egin:
+
+```bash
+sudo yunohost app install https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing --debug
+edo
+sudo yunohost app upgrade h5ai -u https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing --debug
+```
+
+**Informazio gehiago aplikazioaren paketatzeari buruz:**
diff --git a/README_fr.md b/README_fr.md
index c895c47..e6f16aa 100644
--- a/README_fr.md
+++ b/README_fr.md
@@ -1,6 +1,6 @@
# h5ai pour YunoHost
@@ -9,10 +9,10 @@ It shall NOT be edited by hand.
[](https://install-app.yunohost.org/?app=h5ai)
-*[Read this readme in english.](./README.md)*
+*[Lire le README dans d'autres langues.](./ALL_README.md)*
-> *Ce package vous permet d’installer h5ai rapidement et simplement sur un serveur YunoHost.
-Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l’installer et en profiter.*
+> *Ce package vous permet d’installer h5ai rapidement et simplement sur un serveur YunoHost.*
+> *Si vous n’avez pas YunoHost, consultez [ce guide](https://yunohost.org/install) pour savoir comment l’installer et en profiter.*
## Vue d’ensemble
@@ -23,9 +23,9 @@ h5ai est un indexeur de fichiers moderne pour les serveurs web HTTP avec un focu
Parmi les fonctionnalités optionnelles, citons : le tri des fichiers, différents modes d'affichage, la localisation, le fil d'Ariane, l'arborescence, les en-têtes et pieds de page personnalisés, le filtrage et la recherche de fichiers, la taille des dossiers, le rafraîchissement automatique, l'emballage...
-**Version incluse :** 0.30.0~ynh10
+**Version incluse :** 0.30.0~ynh10
-**Démo :** https://larsjung.de/h5ai/demo/
+**Démo :**
## Captures d’écran
@@ -33,22 +33,22 @@ Parmi les fonctionnalités optionnelles, citons : le tri des fichiers, différen
## Documentations et ressources
-* Site officiel de l’app :
-* Documentation officielle de l’admin :
-* Dépôt de code officiel de l’app :
-* YunoHost Store:
-* Signaler un bug :
+- Site officiel de l’app :
+- Documentation officielle de l’admin :
+- Dépôt de code officiel de l’app :
+- YunoHost Store :
+- Signaler un bug :
## Informations pour les développeurs
-Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing).
+Merci de faire vos pull request sur la [branche `testing`](https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing).
-Pour essayer la branche testing, procédez comme suit.
+Pour essayer la branche `testing`, procédez comme suit :
-``` bash
+```bash
sudo yunohost app install https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing --debug
ou
sudo yunohost app upgrade h5ai -u https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing --debug
```
-**Plus d’infos sur le packaging d’applications :**
\ No newline at end of file
+**Plus d’infos sur le packaging d’applications :**
diff --git a/README_gl.md b/README_gl.md
new file mode 100644
index 0000000..ae542fe
--- /dev/null
+++ b/README_gl.md
@@ -0,0 +1,54 @@
+
+
+# h5ai para YunoHost
+
+[](https://dash.yunohost.org/appci/app/h5ai)  
+
+[](https://install-app.yunohost.org/?app=h5ai)
+
+*[Le este README en outros idiomas.](./ALL_README.md)*
+
+> *Este paquete permíteche instalar h5ai de xeito rápido e doado nun servidor YunoHost.*
+> *Se non usas YunoHost, le a [documentación](https://yunohost.org/install) para saber como instalalo.*
+
+## Vista xeral
+
+h5ai is a modern file indexer for HTTP web servers with focus on your files. Directories are displayed in a appealing way and browsing them is enhanced by different views, a breadcrumb and a tree overview.
+
+### Features
+
+Some of the optional features are: file sorting, different view modes, localization, a breadcrumb, a tree view, custom headers and footers, file filter and search, folder sizes, auto refresh, packaged download, QR codes, thumbnails, file previews
+
+
+**Versión proporcionada:** 0.30.0~ynh10
+
+**Demo:**
+
+## Capturas de pantalla
+
+
+
+## Documentación e recursos
+
+- Web oficial da app:
+- Documentación oficial para admin:
+- Repositorio de orixe do código:
+- Tenda YunoHost:
+- Informar dun problema:
+
+## Info de desenvolvemento
+
+Envía a túa colaboración á [rama `testing`](https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing).
+
+Para probar a rama `testing`, procede deste xeito:
+
+```bash
+sudo yunohost app install https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing --debug
+ou
+sudo yunohost app upgrade h5ai -u https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing --debug
+```
+
+**Máis info sobre o empaquetado da app:**
diff --git a/README_zh_Hans.md b/README_zh_Hans.md
new file mode 100644
index 0000000..ead11a3
--- /dev/null
+++ b/README_zh_Hans.md
@@ -0,0 +1,54 @@
+
+
+# YunoHost 上的 h5ai
+
+[](https://dash.yunohost.org/appci/app/h5ai)  
+
+[](https://install-app.yunohost.org/?app=h5ai)
+
+*[阅读此 README 的其它语言版本。](./ALL_README.md)*
+
+> *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 h5ai。*
+> *如果您还没有 YunoHost,请参阅[指南](https://yunohost.org/install)了解如何安装它。*
+
+## 概况
+
+h5ai is a modern file indexer for HTTP web servers with focus on your files. Directories are displayed in a appealing way and browsing them is enhanced by different views, a breadcrumb and a tree overview.
+
+### Features
+
+Some of the optional features are: file sorting, different view modes, localization, a breadcrumb, a tree view, custom headers and footers, file filter and search, folder sizes, auto refresh, packaged download, QR codes, thumbnails, file previews
+
+
+**分发版本:** 0.30.0~ynh10
+
+**演示:**
+
+## 截图
+
+
+
+## 文档与资源
+
+- 官方应用网站:
+- 官方管理文档:
+- 上游应用代码库:
+- YunoHost 商店:
+- 报告 bug:
+
+## 开发者信息
+
+请向 [`testing` 分支](https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing) 发送拉取请求。
+
+如要尝试 `testing` 分支,请这样操作:
+
+```bash
+sudo yunohost app install https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing --debug
+或
+sudo yunohost app upgrade h5ai -u https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing --debug
+```
+
+**有关应用打包的更多信息:**
diff --git a/manifest.toml b/manifest.toml
index c58485c..c196fc7 100644
--- a/manifest.toml
+++ b/manifest.toml
@@ -43,9 +43,8 @@ ram.runtime = "50M"
[resources.sources]
[resources.sources.main]
- url = "https://release.larsjung.de/h5ai/h5ai-0.30.0.zip"
- sha256 = "fe138305a61d72094beb8c507dab728020158e4b00dae695a60b9803babb3e30"
- in_subdir = false
+ url = "https://github.com/lrsjng/h5ai/archive/refs/tags/v0.30.0.tar.gz"
+ sha256 = "f1638557ec79e6fe6bd9303b1e9d8d0180a620dbf4811b6c194befa24769800c"
[resources.system_user]
allow_sftp = true
diff --git a/scripts/_common.sh b/scripts/_common.sh
index 1e47ce7..9157d07 100644
--- a/scripts/_common.sh
+++ b/scripts/_common.sh
@@ -1,19 +1,3 @@
#!/bin/bash
-#=================================================
-# COMMON VARIABLES
-#=================================================
-# PHP APP SPECIFIC
-#=================================================
-
-#=================================================
-# PERSONAL HELPERS
-#=================================================
-
-#=================================================
-# EXPERIMENTAL HELPERS
-#=================================================
-
-#=================================================
-# FUTURE OFFICIAL HELPERS
-#=================================================
+nodejs_version="10.15"
diff --git a/scripts/backup b/scripts/backup
index c9a5a41..1d1ef84 100644
--- a/scripts/backup
+++ b/scripts/backup
@@ -1,11 +1,5 @@
#!/bin/bash
-#=================================================
-# GENERIC START
-#=================================================
-# IMPORT GENERIC HELPERS
-#=================================================
-
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
@@ -15,22 +9,8 @@ source /usr/share/yunohost/helpers
#=================================================
ynh_print_info --message="Declaring files to be backed up..."
-#=================================================
-# BACKUP THE APP MAIN DIR
-#=================================================
-
ynh_backup --src_path="$install_dir" --is_big
-
-#=================================================
-# BACKUP THE NGINX CONFIGURATION
-#=================================================
-
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
-
-#=================================================
-# BACKUP THE PHP-FPM CONFIGURATION
-#=================================================
-
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
diff --git a/scripts/install b/scripts/install
index 98dec66..2b515a6 100644
--- a/scripts/install
+++ b/scripts/install
@@ -9,13 +9,28 @@
source _common.sh
source /usr/share/yunohost/helpers
+#=================================================
+# INSTALL NODEJS
+#=================================================
+ynh_script_progression --message="Install nodejs..."
+
+ynh_install_nodejs --nodejs_version=$nodejs_version
+ynh_use_nodejs
+
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
-ynh_script_progression --message="Setting up source files..." --weight=4
+ynh_script_progression --message="Setting up source files..."
-# Download, check integrity, uncompress and patch the source from app.src
-ynh_setup_source --dest_dir="$install_dir"
+
+tmpdir=$(mktemp -d)
+ynh_setup_source --dest_dir="$tmpdir"
+pushd $tmpdir
+ npm ci
+ npm run build
+ mv build/_h5ai $install_dir/_h5ai
+popd
+ynh_secure_remove $tmpdir
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
@@ -24,7 +39,7 @@ chmod 700 "$install_dir/_h5ai/private/conf"
#=================================================
# SYSTEM CONFIGURATION
#=================================================
-ynh_script_progression --message="Adding system configurations related to $app..." --weight=3
+ynh_script_progression --message="Adding system configurations related to $app..."
# Create a dedicated PHP-FPM config
ynh_add_fpm_config
diff --git a/scripts/remove b/scripts/remove
index 5b17c2d..6aa19c6 100644
--- a/scripts/remove
+++ b/scripts/remove
@@ -1,11 +1,5 @@
#!/bin/bash
-#=================================================
-# GENERIC START
-#=================================================
-# IMPORT GENERIC HELPERS
-#=================================================
-
source _common.sh
source /usr/share/yunohost/helpers
diff --git a/scripts/restore b/scripts/restore
index 84e8208..0ba14eb 100644
--- a/scripts/restore
+++ b/scripts/restore
@@ -1,11 +1,5 @@
#!/bin/bash
-#=================================================
-# GENERIC START
-#=================================================
-# IMPORT GENERIC HELPERS
-#=================================================
-
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
@@ -15,7 +9,7 @@ source /usr/share/yunohost/helpers
#=================================================
ynh_script_progression --message="Restoring the app main directory..." --weight=4
-ynh_restore_file --origin_path="$install_dir" --not_mandatory
+ynh_restore_file --origin_path="$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
diff --git a/scripts/upgrade b/scripts/upgrade
index a4c1df1..cab6e26 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -3,19 +3,30 @@
source _common.sh
source /usr/share/yunohost/helpers
-upgrade_type=$(ynh_check_app_version_changed)
+#=================================================
+# INSTALL NODEJS
+#=================================================
+ynh_script_progression --message="Install nodejs..."
+
+ynh_install_nodejs --nodejs_version=$nodejs_version
+ynh_use_nodejs
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
-
-if [ "$upgrade_type" == "UPGRADE_APP" ]
-then
- ynh_script_progression --message="Upgrading source files..."
-
- # Download, check integrity, uncompress and patch the source from app.src
- ynh_setup_source --dest_dir="$install_dir" --keep="_h5ai/private/conf/options.json"
-fi
+ynh_script_progression --message="Setting up source files..."
+
+tmpdir=$(mktemp -d)
+ynh_setup_source --dest_dir="$tmpdir"
+pushd $tmpdir
+ cp $install_dir/_h5ai/private/conf/options.json ./options.json.bkp
+ npm ci
+ npm run build
+ ynh_secure_remove $install_dir/_h5ai
+ mv build/_h5ai $install_dir/_h5ai
+ cp ./options.json.bkp $install_dir/_h5ai/private/conf/options.json
+popd
+ynh_secure_remove $tmpdir
chmod o-rwx "$install_dir"
chown $app:www-data "$install_dir"