aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-12-24 10:34:37 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-12-24 10:34:37 +0000
commit919724ab50586be54a1d903e47d772265e01bf38 (patch)
treeb28758326f1f4d528897eff65a285e1ad720dfeb
parent496df32d91da94fe785d7860dabb5dc054489ba1 (diff)
downloadupstream-919724ab50586be54a1d903e47d772265e01bf38.tar.gz
upstream-919724ab50586be54a1d903e47d772265e01bf38.tar.bz2
upstream-919724ab50586be54a1d903e47d772265e01bf38.zip
scripts/combined-image.sh: remove the use of mktemp to make it more portable
SVN-Revision: 18920
-rw-r--r--scripts/combined-image.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/combined-image.sh b/scripts/combined-image.sh
index 30373e7566..5472b2cfd2 100644
--- a/scripts/combined-image.sh
+++ b/scripts/combined-image.sh
@@ -7,9 +7,11 @@ BLKSZ=65536
exit 1
}
+IMAGE=${3:-openwrt-combined.img}
+
# Make sure provided images are 64k aligned.
-kern=$(mktemp)
-root=$(mktemp)
+kern="${IMAGE}.kernel"
+root="${IMAGE}.rootfs"
dd if="$1" of="$kern" bs=$BLKSZ conv=sync 2>/dev/null
dd if="$2" of="$root" bs=$BLKSZ conv=sync 2>/dev/null
@@ -26,7 +28,7 @@ md5=$(cat "$kern" "$root" | md5sum -)
$(stat -c "%s" "$kern") $(stat -c "%s" "$root") "${md5%% *}" | \
dd bs=$BLKSZ conv=sync;
cat "$kern" "$root"
-) > ${3:-openwrt-combined.img} 2>/dev/null
+) > ${IMAGE} 2>/dev/null
# Clean up.
rm -f "$kern" "$root"