diff options
author | Felix Fietkau <nbd@openwrt.org> | 2009-12-24 10:34:37 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2009-12-24 10:34:37 +0000 |
commit | b97c4008bd4abe67aa135349ce879147098346bd (patch) | |
tree | 22de4a1e823f9757e74eac4cb22f11ff6c4594f8 | |
parent | 96ce3160e246f8ce7c4c5ebd8ae691a59512a3c8 (diff) | |
download | master-187ad058-b97c4008bd4abe67aa135349ce879147098346bd.tar.gz master-187ad058-b97c4008bd4abe67aa135349ce879147098346bd.tar.bz2 master-187ad058-b97c4008bd4abe67aa135349ce879147098346bd.zip |
scripts/combined-image.sh: remove the use of mktemp to make it more portable
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18920 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | scripts/combined-image.sh | 8 |
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" |