Find the answer to your Linux question:
Results 1 to 2 of 2
hi all, today, i tried to create a little bashscript, which copys the files form ~/dev/trunk to ~/hsdev but with a couple of rules: - Folder install and his files ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2006
    Posts
    1

    Copy files from a SVN repository


    hi all,

    today, i tried to create a little bashscript, which copys the files form ~/dev/trunk to ~/hsdev but with a couple of rules:
    - Folder install and his files mustn't copied
    - file lib/config.inc.php mustn't copied
    - All folders with the name .svn and their files mustn't copied

    Now i've these problemes:
    - the rule not to copy the folder .svn doesn't work
    - the content of the folder lang/ isn't copied to ~/hsdev/lang but to ~/hsdev/

    my script:

    Code:
    #!/bin/sh
    find dev/trunk \
      -not -regex ".*/install" \
      -not -regex ".*/lib/config.inc.php.*" \
      -not -regex ".*/files.*" \
      -not -regex ".*/\.svn/.*" \
      -exec cp -Ruv --target-directory=hsdev/ \{\} \;
    does anyone know a solution?
    thanks

    -mix

  2. #2
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris
    Posts
    1,294
    Hi, mix-.

    If you have not already solved this, give a look at "svn export": svn help export. It seems as if you don't want the meta files, which is essentially what export does ... cheers, drl
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •