Added spotify plugin. Fixed bilibili signing. Added bilibili and spotify link handling.

This commit is contained in:
Koen
2024-06-07 09:32:16 +02:00
parent 7353edb058
commit a345da0feb
12 changed files with 46 additions and 18 deletions
+18 -12
View File
@@ -1,21 +1,27 @@
#!/bin/bash
# Array of directories to look in
dirs=("app/src/unstable/assets/sources" "app/src/stable/assets/sources")
# Loop through each directory
sign_scripts() {
local plugin_dir=$1
if [[ -d "$plugin_dir" ]]; then
script_file=$(find "$plugin_dir" -maxdepth 2 -name '*Script.js')
config_file=$(find "$plugin_dir" -maxdepth 2 -name '*Config.json')
sign_script="$plugin_dir/sign.sh"
if [[ -f "$sign_script" && -n "$script_file" && -n "$config_file" ]]; then
sh "$sign_script" "$script_file" "$config_file"
fi
fi
}
for dir in "${dirs[@]}"; do
if [[ -d "$dir" ]]; then # Check if directory exists
for plugin in "$dir"/*; do # Loop through each plugin folder
if [[ -d "$dir" ]]; then
for plugin in "$dir"/*; do
if [[ -d "$plugin" ]]; then
script_file=$(find "$plugin" -maxdepth 1 -name '*Script.js')
config_file=$(find "$plugin" -maxdepth 1 -name '*Config.json')
sign_script="$plugin/sign.sh"
if [[ -f "$sign_script" && -n "$script_file" && -n "$config_file" ]]; then
sh "$sign_script" "$script_file" "$config_file"
fi
sign_scripts "$plugin"
fi
done
fi
done
done