mirror of
https://github.com/YunoHost-Apps/codimd_ynh.git
synced 2024-09-03 18:16:32 +02:00
commit
a682a0eeb7
3 changed files with 28 additions and 2 deletions
22
scripts/_common.sh
Normal file
22
scripts/_common.sh
Normal 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
|
||||
#=================================================
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue