mirror of
https://github.com/a2-4am/4cade.git
synced 2024-12-24 22:31:40 +00:00
20 lines
375 B
Bash
Executable File
20 lines
375 B
Bash
Executable File
#!/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"
|