mirror of
https://github.com/a2-4am/4cade.git
synced 2025-01-01 00:29:57 +00:00
tidy up Bash script
This commit is contained in:
parent
c2a2550702
commit
cbc0f4191a
@ -2,16 +2,15 @@
|
|||||||
|
|
||||||
# run from project root directory
|
# run from project root directory
|
||||||
|
|
||||||
games=`cat res/GAMES.CONF | grep "," | grep -v "^#" | cut -d"," -f2 | cut -d"=" -f1 | sort`
|
games=$(grep "," res/GAMES.CONF | grep -v "^#" | cut -d"," -f2 | cut -d"=" -f1 | sort)
|
||||||
cat res/GAMEHELP/STANDARD > "$1"
|
cp res/GAMEHELP/STANDARD "$1"
|
||||||
for c in {A..Z}; do
|
for c in {A..Z}; do
|
||||||
echo -e "group$c"
|
echo "group$c"
|
||||||
echo "$games" | grep "^$c" | while read game; do
|
echo "$games" | grep "^$c" | while read -r game; do
|
||||||
echo "!byte ${#game}"
|
echo "!byte ${#game}"
|
||||||
echo "!text \"$game\""
|
echo "!text \"$game\""
|
||||||
if [ -f "res/GAMEHELP/$game" ]; then
|
if [ -f "res/GAMEHELP/$game" ]; then
|
||||||
offset=$(wc -c <"$1")
|
echo "!be24 $(wc -c <"$1")"
|
||||||
echo "!be24 $offset"
|
|
||||||
cat res/GAMEHELP/"$game" >> "$1"
|
cat res/GAMEHELP/"$game" >> "$1"
|
||||||
else
|
else
|
||||||
echo "!be24 0"
|
echo "!be24 0"
|
||||||
|
Loading…
Reference in New Issue
Block a user