1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/retroarch_ynh.git synced 2024-09-03 20:16:12 +02:00
retroarch_ynh/conf/indexer.sh

30 lines
841 B
Bash
Raw Normal View History

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__
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
2021-05-09 17:36:14 +02:00
#=================================================
# Update the index
#=================================================
2021-05-09 11:19:10 +02:00
ynh_use_nodejs
cd $final_path/assets/frontend/bundle/
../../../indexer > .index-xhr
cd $final_path/assets/cores
../../indexer > .index-xhr