summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-07-26 13:33:09 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2010-07-26 13:33:09 +0200
commit181edac276f7eda70ce5e2b9fac48f5a73d13873 (patch)
tree2f28f16684b176d251853d8f960613e6cde5b9cb
parentb3a99d7f44680ef629ceea377cf9938fec94921d (diff)
fixup cpio usage on MacOS X host
-rw-r--r--mk/image.mk4
-rwxr-xr-xscripts/cpio15
2 files changed, 10 insertions, 9 deletions
diff --git a/mk/image.mk b/mk/image.mk
index 00c0dd17c..440d975b4 100644
--- a/mk/image.mk
+++ b/mk/image.mk
@@ -50,13 +50,13 @@ ${BIN_DIR}/${ROOTFSUSERTARBALL}: ${TARGET_DIR}
${BIN_DIR}/${INITRAMFS}: ${TARGET_DIR}
cd ${TARGET_DIR}; find . | sed -n '/^\.\//s///p' | sort | \
- cpio -oC512 r -Mdist -Hnewc | ${ADK_COMPRESSION_TOOL} >$@
+ cpio -o r -C512 -Hnewc | ${ADK_COMPRESSION_TOOL} >$@
${BUILD_DIR}/${INITRAMFS_PIGGYBACK}: ${TARGET_DIR}
$(SED) 's#^CONFIG_INITRAMFS_SOURCE.*#CONFIG_INITRAMFS_SOURCE="${BUILD_DIR}/${INITRAMFS_PIGGYBACK}"#' \
$(LINUX_DIR)/.config
cd ${TARGET_DIR}; find . | sed -n '/^\.\//s///p' | sort | \
- cpio -oC512 r -Mdist -Hnewc >$@
+ cpio -o r -C512 -Hnewc >$@
${BIN_DIR}/${ROOTFSSQUASHFS}: ${TARGET_DIR}
PATH='${TARGET_PATH}' \
diff --git a/scripts/cpio b/scripts/cpio
index 11db74b36..41423ef96 100755
--- a/scripts/cpio
+++ b/scripts/cpio
@@ -1,28 +1,29 @@
#!/usr/bin/env bash
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.
+set -x
opt=
user="-R 0:0"
os=$(uname)
case $os in
NetBSD|MirBSD|OpenBSD)
- quiet=""
+ cmd="$@ -Mdist"
;;
Darwin)
- user="-R root:wheel"
- quiet=""
+ user="-R root:"
+ cmd=$(echo "$@"|sed -e "s#-Hnewc#--format newc#")
;;
*)
- quiet="--quiet"
+ cmd="$@ -Mdist --quiet"
;;
esac
if [ "$2" = "r" ];then
opt=$user
fi
-cmd=$(echo "$@"|sed -e "s# r ##")
+cmd=$(echo "$cmd"|sed -e "s# r # #")
if [ -x /usr/bin/cpio ];then
- /usr/bin/cpio $quiet $opt $cmd
+ /usr/bin/cpio $cmd $opt
else
- /bin/cpio $quiet $opt $cmd
+ /bin/cpio $cmd $opt
fi