Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Copy a whole directory with phing

Tags:

svn

phing

Does anyone know if its possible to use phing to copy an entire folder with files and sub folders (joomla core download) to another folder, but without the .svn folders.

I have downloaded joomla using SVN, and I want to export it to my joomla dev folder using phing, without the need to have to list every single file type. My plan is to use this to keep my dev updated from the trunk.

I know how to exclude

But cannot find anyway to include everything without listing every file, or trying to guess every file type, just in case I miss something!

Suggestions Paul

like image 546
Paul M Avatar asked Jun 18 '09 21:06

Paul M


People also ask

How do I copy and paste a directory in Linux command line?

You have to use the cp command. cp is shorthand for copy. The syntax is simple, too. Use cp followed by the file you want to copy and the destination where you want it moved.

How do I copy a directory in Linux?

To copy files or directories in Unix-based operating systems (Linux and MacOS), you use the cp command. The cp command is a relatively simple command, but its behavior changes slightly depending on the inputs (files vs directories) and the options you pass to it.

How do I copy a directory in Ubuntu terminal?

Answer: Use the cp Command You can use the cp command to copy files locally from one directory to another. The -a option copy files recursively, while preserving the file attributes such as timestamp. The period symbol ( . ) at end of the source path allows to copy all files and folders, including hidden ones.


1 Answers

Looks like phing is modeled after ant? Try this:

<copy todir="my/joomla/dev">
  <fileset dir="joomla/checkout">
    <include>**</include>
    <exclude>**/.svn/**</exclude>
  </fileset>
</copy>
like image 118
Zac Thompson Avatar answered Sep 30 '22 18:09

Zac Thompson