From 4a7c98dbaf129f2546f8b8780650b4041c336228 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Wed, 17 Oct 2007 14:38:39 +0200 Subject: [PATCH] Remove the cpio emulator script. The users of cpio have their own emulation by now. --- .gitignore | 1 - Makefile | 1 - cpio.sh | 60 ------------------------------------------------------ 3 files changed, 62 deletions(-) delete mode 100644 cpio.sh diff --git a/.gitignore b/.gitignore index 2cb4002ba8..63c918c667 100644 --- a/.gitignore +++ b/.gitignore @@ -172,4 +172,3 @@ config.status config.mak.autogen config.mak.append configure -cpio diff --git a/Makefile b/Makefile index ea00d44337..5171a69425 100644 --- a/Makefile +++ b/Makefile @@ -500,7 +500,6 @@ ifneq (,$(findstring MINGW,$(uname_S))) NOEXECTEMPL = .noexec template_dir = ../share/git-core/templates/ ETC_GITCONFIG = ../etc/gitconfig - SCRIPT_SH += cpio.sh endif ifneq (,$(findstring arm,$(uname_M))) ARM_SHA1 = YesPlease diff --git a/cpio.sh b/cpio.sh deleted file mode 100644 index df5f64c14c..0000000000 --- a/cpio.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/sh -# -# Emulates some cpio behavior using GNU tar - -die() { - echo >&2 "$@" - exit 1 -} - -null= - -while test $# -gt 0; do - case "$1" in - -0) null=--null;; - -o) mode=o;; - -iuv) ;; - -pumd|-pumdl) - mode=p - dir="$2" - shift - ;; - *) die "cpio emulation supports only -0, -o, -iuv, -pumdl";; - esac - shift -done - -prev= - -filterdirs() { - while read f; do - if test -d "$f"; then - # list only empty directories - # here we assume that directories are listed after - # its files (aka 'find -depth'), hence, a directory - # that is not empty will be a leading sub-string - # of the preceding entry - case "$prev" in - "$f"/* ) ;; - *) echo "$f";; - esac - else - echo "$f" - fi - prev="$f" - done -} - -case $mode in -o) - tar --create --file=- $null --files-from=- - ;; -p) - test -z "$null" || die "cpio: cannot use -0 in pass-through mode" - filterdirs | - tar --create --file=- --files-from=- | - tar --extract --directory="$dir" --file=- - ;; -*) - tar xvf - -esac