Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/utils/embedded add compression support.
details: https://anonhg.NetBSD.org/src/rev/99149e418618
branches: trunk
changeset: 784802:99149e418618
user: christos <christos%NetBSD.org@localhost>
date: Sun Feb 10 01:28:42 2013 +0000
description:
add compression support.
diffstat:
distrib/utils/embedded/mkimage | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diffs (34 lines):
diff -r b66a7f54e604 -r 99149e418618 distrib/utils/embedded/mkimage
--- a/distrib/utils/embedded/mkimage Sun Feb 10 01:24:40 2013 +0000
+++ b/distrib/utils/embedded/mkimage Sun Feb 10 01:28:42 2013 +0000
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: mkimage,v 1.21 2013/02/09 18:50:11 christos Exp $
+# $NetBSD: mkimage,v 1.22 2013/02/10 01:28:42 christos Exp $
#
# Copyright (c) 2013 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -118,6 +118,11 @@
shift
fi
+case "$image" in
+*.gz) compress=true; image="${image%.gz}";;
+*) compress=false;;
+esac
+
echo ${bar} configuring sets ${bar}
(echo '/set type=dir uname=root gname=wheel mode=0755'
for i in $selected_sets; do
@@ -152,4 +157,11 @@
echo ${bar} Running fdisk ${bar}
${FDISK} -f -u -0 -s ${msdosid}/${init}/${boot} -F ${image}
fi
+
+if $compress; then
+ echo ${bar} Compressing image ${bar}
+ gzip -9 ${image}
+ image="${image}.gz"
+fi
+
echo ${bar} Image is ${image} ${bar}
Home |
Main Index |
Thread Index |
Old Index