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