]> Dogcows Code - chaz/tar/commitdiff
(copy_files): Accept optional third argument: a prefix
authorSergey Poznyakoff <gray@gnu.org.ua>
Thu, 19 May 2005 15:32:38 +0000 (15:32 +0000)
committerSergey Poznyakoff <gray@gnu.org.ua>
Thu, 19 May 2005 15:32:38 +0000 (15:32 +0000)
to be appended to destination file names.
Import paxutils/paxlib files.

bootstrap

index d62061725623f3fd2e6149aba42a3a7e2df7b289..affe7a9a324a0802eb445c343669c5c2dca77f95 100755 (executable)
--- 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
This page took 0.018636 seconds and 4 git commands to generate.