mirror of
https://github.com/YunoHost-Apps/retroarch_ynh.git
synced 2024-09-03 20:16:12 +02:00
cleaning
This commit is contained in:
parent
b1c254e2f9
commit
02570cadbc
1 changed files with 21 additions and 23 deletions
|
@ -35,7 +35,7 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
#=================================================
|
||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Validating installation parameters..." --time --weight=1
|
||||
ynh_script_progression --message="Validating installation parameters..." --weight=1
|
||||
|
||||
final_path=/opt/yunohost/$app
|
||||
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
||||
|
@ -46,7 +46,7 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
|
|||
#=================================================
|
||||
# STORE SETTINGS FROM MANIFEST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Storing installation settings..." --time --weight=1
|
||||
ynh_script_progression --message="Storing installation settings..." --weight=1
|
||||
|
||||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||
|
@ -55,7 +55,7 @@ ynh_app_setting_set --app=$app --key=is_public --value=$is_public
|
|||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing dependencies..." --time --weight=1
|
||||
ynh_script_progression --message="Installing dependencies..." --weight=13
|
||||
|
||||
ynh_install_nodejs --nodejs_version=10
|
||||
ynh_use_nodejs
|
||||
|
@ -67,7 +67,7 @@ ynh_install_app_dependencies $pkg_dependencies
|
|||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Setting up source files..." --time --weight=1
|
||||
ynh_script_progression --message="Setting up source files..." --weight=60
|
||||
|
||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
|
@ -87,16 +87,10 @@ touch $final_path/analytics.js #https://github.com/libretro/RetroArch/issues/453
|
|||
#Get the indexer as exe so that folder w/ ROMs can be indexed
|
||||
chmod +x $final_path/indexer
|
||||
|
||||
###install bundle source. As it is change every day (only nightly exists) - ynh_setup_source is useless
|
||||
#ynh_setup_source --dest_dir="$final_path/assets/frontend/bundle" --source_id=bundle
|
||||
#wget -q $(grep 'SOURCE_URL=' "../conf/bundle.src" | cut --delimiter='=' --fields=2-) -O $final_path/assets/frontend/bundle/bundle.zip
|
||||
#unzip -q $final_path/assets/frontend/bundle/bundle.zip -d $final_path/assets/frontend/bundle/
|
||||
#rm $final_path/assets/frontend/bundle/bundle.zip
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring nginx web server..." --time --weight=1
|
||||
ynh_script_progression --message="Configuring nginx web server..." --weight=3
|
||||
|
||||
#backup & Update nginx MIME type so wasm mime type is recognized
|
||||
|
||||
|
@ -117,10 +111,22 @@ ynh_add_nginx_config
|
|||
# Set permissions to app files
|
||||
chown -R root: $final_path
|
||||
|
||||
#=================================================
|
||||
# SETUP INDEX
|
||||
#=================================================
|
||||
#indexer use the current directory to run #https://github.com/libretro/RetroArch/tree/master/pkg/emscripten
|
||||
#Indexer will list the available ROM and cores for Retroarch
|
||||
ynh_script_progression --message="Setup Indexer for content..." --weight=3
|
||||
|
||||
cd $final_path/assets/frontend/bundle/
|
||||
../../../indexer > .index-xhr
|
||||
cd $final_path/assets/cores
|
||||
../../indexer > .index-xhr
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring SSOwat..." --time --weight=1
|
||||
ynh_script_progression --message="Configuring SSOwat..." --weight=1
|
||||
|
||||
# Make app public if necessary
|
||||
if [ $is_public -eq 1 ]
|
||||
|
@ -131,22 +137,14 @@ fi
|
|||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading nginx web server..." --time --weight=1
|
||||
ynh_script_progression --message="Reloading nginx web server..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
#=================================================
|
||||
# SETUP INDEX
|
||||
#=================================================
|
||||
#indexer use the active directory to run #https://github.com/libretro/RetroArch/tree/master/pkg/emscripten
|
||||
#Indexer will list the available ROM and cores for Retroarch
|
||||
cd $final_path/assets/frontend/bundle/
|
||||
../../../indexer > .index-xhr
|
||||
cd $final_path/assets/cores
|
||||
../../indexer > .index-xhr
|
||||
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Installation of $app completed" --time --last
|
||||
ynh_script_progression --message="Installation of $app completed" --last
|
||||
|
|
Loading…
Reference in a new issue