From 181edac276f7eda70ce5e2b9fac48f5a73d13873 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 26 Jul 2010 13:33:09 +0200 Subject: fixup cpio usage on MacOS X host --- scripts/cpio | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'scripts') 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 -- cgit v1.2.3