Supermodel/automation_tools/update_manifest.sh

22 lines
754 B
Bash
Raw Normal View History

2024-08-23 15:01:32 +00:00
#!/bin/bash
2024-08-23 15:08:51 +00:00
git clone https://github.com/RetroDECK/RetroDECK --depth=1 RetroDECK
2024-08-23 15:01:32 +00:00
# Creating MAME manifest
manifest_header="manifest-header.yml"
module="module.yml"
output_manifest="net.retrodeck.supermodel.yml"
command="/app/bin/supermodel"
2024-08-23 15:13:03 +00:00
sed -n '/command/q;p' RetroDECK/net.retrodeck.retrodeck.yml > "$manifest_header"
2024-08-23 15:01:32 +00:00
echo -e "command: $command\n" >> "$manifest_header"
sed -i '/^[[:space:]]*#/d' "$manifest_header"
sed -i 's/[[:space:]]*#.*$//' "$manifest_header"
sed -n '/finish-args:/,${/cleanup:/q;p;}' RetroDECK/net.retrodeck.retrodeck.yml >> "$manifest_header"
sed -i 's/net.retrodeck.retrodeck/net.retrodeck.supermodel/' "$manifest_header"
cat "$manifest_header" > "$output_manifest"
cat "$module" >> "$output_manifest"
rm -rf RetroDECK