diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2010-07-29 15:25:12 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2010-07-29 15:25:12 +0200 |
commit | fd6481d82ff407139157e53df28563d40bb3ad3b (patch) | |
tree | ed2ae9e08c31d1eed424793272a60c25cdec6c00 /scripts | |
parent | 14804005d5b33beb6f52d4a72034acb00c00eb90 (diff) |
add a cpio implementation to tools directory
cpio utility is a mess in point of portability.
For example NetBSD cpio implementation does not support
userid and groupid changes for the archive. This
feature is required for initramfs filesystem targets.
This cpio is from the Heirloom project.
Fix needed rebuild of tools, when changing targets.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/cpio | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/scripts/cpio b/scripts/cpio deleted file mode 100755 index 790593b97..000000000 --- a/scripts/cpio +++ /dev/null @@ -1,29 +0,0 @@ -#!/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. - -opt= -user="-R 0:0" -os=$(uname) -case $os in - NetBSD|MirBSD|OpenBSD) - cmd="$@" - ;; - FreeBSD|Darwin) - user="-R root:" - cmd=$(echo "$@"|sed -e "s#-Hnewc#--format newc#") - cmd="--quiet $cmd" - ;; - *) - cmd="--quiet $@" - ;; -esac -if [ "$2" = "r" ];then - opt="$user" -fi -cmd=$(echo "$cmd"|sed -e "s# r # #") -if [ -x /usr/bin/cpio ];then - /usr/bin/cpio $opt $cmd -else - /bin/cpio $opt $cmd -fi |