diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-08-31 00:13:40 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-08-31 00:13:40 +0300 |
| commit | 1ab464d959b9ee3d3bb6758ac0d9d33fc6c77e46 (patch) | |
| tree | 8d6832f0eadacce1613778bcecfcdaa2391aba79 /scripts | |
| parent | 2939b749b1169a0c01c19698a3f0026034346ebd (diff) | |
| download | kmi-1ab464d959b9ee3d3bb6758ac0d9d33fc6c77e46.tar.gz kmi-1ab464d959b9ee3d3bb6758ac0d9d33fc6c77e46.zip | |
Improved linkind process, added padding generator
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/gen-padding | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/gen-padding b/scripts/gen-padding new file mode 100755 index 0000000..22c12f9 --- /dev/null +++ b/scripts/gen-padding @@ -0,0 +1,9 @@ +#!/bin/sh + +align="$1" +filename="$2" + +filesize=$(stat -c "%s" "${filename}") +padsize=$(echo "${filesize}" | awk "{print ${align} - (\$1 % ${align})}") + +dd if=/dev/zero ibs=1 count="${padsize}" >> "${filename}" |
