1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/codimd_ynh.git synced 2024-09-03 18:16:32 +02:00

Merge pull request #28 from ericgaspar/add-_common.sh

Add  common.sh
This commit is contained in:
lapineige 2020-04-28 20:56:56 +02:00 committed by GitHub
commit a682a0eeb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 2 deletions

22
scripts/_common.sh Normal file
View file

@ -0,0 +1,22 @@
#!/bin/bash
#=================================================
# COMMON VARIABLES
#=================================================
# dependencies used by the app
pkg_dependencies="postgresql apt-transport-https"
nodejs_version="10"
#=================================================
# PERSONAL HELPERS
#=================================================
#=================================================
# EXPERIMENTAL HELPERS
#=================================================
#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================

View file

@ -7,6 +7,7 @@
#=================================================
source ynh_add_extra_apt_repos__3
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
@ -59,12 +60,12 @@ ynh_app_setting_set "$app" final_path "$final_path"
#==============================================
ynh_script_progression --message="Installing dependencies..."
ynh_install_app_dependencies postgresql apt-transport-https
ynh_install_app_dependencies $pkg_dependencies
# Install Yarn
ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg"
ynh_install_nodejs 10
ynh_install_nodejs --nodejs_version=$nodejs_version
#==============================================
# CREATE DB

View file

@ -6,6 +6,7 @@
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
@ -57,6 +58,8 @@ ynh_script_progression --message="Removing dependencies"
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
ynh_remove_nodejs
#=================================================
# REMOVE APP MAIN DIR
#=================================================