#!/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 -Mdist" 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