fix: use absolute path for core-list.txt in install-cores.sh
Use BASH_SOURCE to get the script's directory, allowing the script to run correctly from any working directory. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
2b696218a9
commit
695ab7405c
|
|
@ -6,6 +6,8 @@ outdir="${1:-./artifacts}"
|
|||
cores_dir="$(mktemp -d)"
|
||||
trap 'rm -rf "$cores_dir"' 0
|
||||
|
||||
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
base_url="https://raw.githubusercontent.com/christianhaitian/retroarch-cores/master/aarch64"
|
||||
target_dir="$cores_dir/home/emulation/.config/retroarch/cores"
|
||||
mkdir -p "$target_dir"
|
||||
|
|
@ -20,7 +22,7 @@ while IFS= read -r core; do
|
|||
else
|
||||
echo "Warning: Failed to download $core, skipping"
|
||||
fi
|
||||
done < scripts/core-list.txt
|
||||
done < "$script_dir/core-list.txt"
|
||||
|
||||
tar cf "$outdir/cores.tar" -C "$cores_dir" .
|
||||
echo "Cores tarball created at $outdir/cores.tar"
|
||||
|
|
|
|||
Loading…
Reference in New Issue