gba-link-connection/examples/pad16.sh
2024-08-26 06:41:25 -03:00

9 lines
157 B
Bash
Executable File

#!/bin/bash
SIZE=$(wc -c < "$1")
DIFF=$(($SIZE % 16))
if (($DIFF > 0)); then
PAD_NEEDED=$((16 - $DIFF))
dd if=/dev/zero bs=1 count=$PAD_NEEDED >> "$1"
fi