2021-05-09 11:19:10 +02:00
|
|
|
#!/bin/bash
|
2021-05-09 17:36:14 +02:00
|
|
|
#This script is run by the cron job in /etc/cron.d/retroarch
|
|
|
|
#It will index all cores in the opt/yunohost/retroarch/assets/cores folder so that they are available in
|
|
|
|
# retroarch itself.
|
2021-05-09 11:19:10 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
source _common.sh
|
|
|
|
|
2021-05-09 17:36:14 +02:00
|
|
|
#=================================================
|
|
|
|
# GET APP SETTINGS
|
|
|
|
#=================================================
|
|
|
|
|
2021-05-09 11:19:10 +02:00
|
|
|
app=__APP__
|
2023-05-07 18:10:21 +02:00
|
|
|
install_dir=$(ynh_app_setting_get --app=$app --key=install_dir)
|
2021-05-09 11:19:10 +02:00
|
|
|
|
2021-05-09 17:36:14 +02:00
|
|
|
#=================================================
|
|
|
|
# Update the index
|
|
|
|
#=================================================
|
2021-05-09 11:19:10 +02:00
|
|
|
|
|
|
|
ynh_use_nodejs
|
2023-05-07 18:10:21 +02:00
|
|
|
cd $install_dir/assets/frontend/bundle/
|
2021-05-09 11:19:10 +02:00
|
|
|
../../../indexer > .index-xhr
|
2023-05-07 18:10:21 +02:00
|
|
|
cd $install_dir/assets/cores
|
2021-05-09 11:19:10 +02:00
|
|
|
../../indexer > .index-xhr
|
|
|
|
|