From 8f1f0955cfa40865240adb3e3689624b63449aaf Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Thu, 19 May 2005 15:32:38 +0000 Subject: [PATCH] (copy_files): Accept optional third argument: a prefix to be appended to destination file names. Import paxutils/paxlib files. --- bootstrap | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/bootstrap b/bootstrap index d620617..affe7a9 100755 --- a/bootstrap +++ b/bootstrap @@ -191,8 +191,15 @@ copy_files() { case $file in "#*") continue;; esac - echo "$0: Copying file $1/$file" - cp -p $1/$file $2/`expr $file : '.*/\(.*\)'` + dst=`echo $file | sed 's^.*/^^'` + if [ $# -eq 3 ]; then + case $dst in + ${3}*) ;; + *) dst=${3}$dst;; + esac + fi + echo "$0: Copying file $1/$file to $2/$dst" + cp -p $1/$file $2/$dst done } @@ -215,6 +222,8 @@ do copy_files ${PAXUTILS_SRCDIR}/$dir $dir done +copy_files ${PAXUTILS_SRCDIR}/paxlib lib pax + # Get gnulib files. case ${GNULIB_SRCDIR--} in -- 2.45.2