mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-10 21:43:23 -05:00
31 lines
611 B
Bash
31 lines
611 B
Bash
#/bin/bash
|
|
|
|
DST=gameinfo.ini
|
|
|
|
mv $DST gameinfo.tmp
|
|
|
|
findEnd=false
|
|
|
|
while IFS= read -r srcLine; do
|
|
if $findEnd; then
|
|
if [[ "$srcLine" == "; credits.txt end" ]]; then
|
|
echo $srcLine >> $DST
|
|
findEnd=false
|
|
fi
|
|
else
|
|
echo $srcLine >> $DST
|
|
if [[ "$srcLine" == "; credits.txt begin" ]]; then
|
|
i=1
|
|
while IFS= read -r line; do
|
|
echo "game-credit-$i=\"$line\"" >> $DST
|
|
i=$(($i+1))
|
|
done < credits.txt
|
|
findEnd=true
|
|
fi
|
|
fi
|
|
done < gameinfo.tmp
|
|
|
|
rm gameinfo.tmp
|
|
|
|
echo "DONE!"
|