projects
/
openwrt
/
staging
/
mkresin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
496df32
)
scripts/combined-image.sh: remove the use of mktemp to make it more portable
author
Felix Fietkau
<nbd@openwrt.org>
Thu, 24 Dec 2009 10:34:37 +0000
(10:34 +0000)
committer
Felix Fietkau
<nbd@openwrt.org>
Thu, 24 Dec 2009 10:34:37 +0000
(10:34 +0000)
SVN-Revision: 18920
scripts/combined-image.sh
patch
|
blob
|
history
diff --git
a/scripts/combined-image.sh
b/scripts/combined-image.sh
index 30373e7566d20120b37a9b14845ee91a3b90271d..5472b2cfd24621e78df1f11ddc440023b44932b8 100644
(file)
--- a/
scripts/combined-image.sh
+++ b/
scripts/combined-image.sh
@@
-7,9
+7,11
@@
BLKSZ=65536
exit 1
}
exit 1
}
+IMAGE=${3:-openwrt-combined.img}
+
# Make sure provided images are 64k aligned.
# 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
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"
$(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"
# Clean up.
rm -f "$kern" "$root"