Fix
This commit is contained in:
parent
e07d26f9a1
commit
a75616e365
|
@ -1,12 +1,12 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ $# -lt 2 ]; then
|
if [ $# -lt 2 ]; then
|
||||||
echo "Usage: $0 <init> <files...>"
|
echo "Usage: $0 <init> <files...>" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -t 1 ]; then
|
if [ -t 1 ]; then
|
||||||
echo "Error: Refusing writing to terminal."
|
echo "Error: Refusing writing to terminal." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -49,8 +49,7 @@ tar cf "$tmptar" -C "$(dirname $init)" "$(basename $init)"
|
||||||
for file in "${files[@]}"; do
|
for file in "${files[@]}"; do
|
||||||
tar rf "$tmptar" -C "$(dirname $file)" "$(basename $file)"
|
tar rf "$tmptar" -C "$(dirname $file)" "$(basename $file)"
|
||||||
done
|
done
|
||||||
echo "makebin init: $(basename $init), files: (" $(tar tf $tmptar) ")";
|
echo "makebin init: $(basename $init), files: (" $(tar tf $tmptar) ")" >&2;
|
||||||
echo;
|
|
||||||
cat "$tmptar" >> "$out"
|
cat "$tmptar" >> "$out"
|
||||||
rm "$tmptar"
|
rm "$tmptar"
|
||||||
|
|
||||||
|
@ -59,5 +58,4 @@ payload_line=$((payload_line + 1))
|
||||||
|
|
||||||
sed -i "s/PAYLOAD_LINE=__PAYLOAD_LINE__/PAYLOAD_LINE=${payload_line}/" ${out}
|
sed -i "s/PAYLOAD_LINE=__PAYLOAD_LINE__/PAYLOAD_LINE=${payload_line}/" ${out}
|
||||||
|
|
||||||
|
|
||||||
cat ${out};
|
cat ${out};
|
||||||
|
|
Loading…
Reference in New Issue