mirror of
https://github.com/a2-4am/4cade.git
synced 2024-08-23 13:29:00 +00:00
20 lines
375 B
Bash
20 lines
375 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
# parameters
|
||
|
# 1 - input file
|
||
|
# 2 - output filename for data file
|
||
|
# stdout - source code of index record
|
||
|
|
||
|
touch "$2"
|
||
|
size=$(wc -c < "$1")
|
||
|
offset=$(wc -c < "$2")
|
||
|
cat "$1" >> "$2"
|
||
|
echo ";"
|
||
|
echo "; Index record for $1"
|
||
|
echo ";"
|
||
|
echo "; This file is automatically generated"
|
||
|
echo ";"
|
||
|
echo " !byte 0"
|
||
|
echo " !be24 $offset"
|
||
|
echo " !le16 $size"
|