SVN export script

If you ever wanted to export some svn repository from and clean it from some things like the tests or other helper scripts, i have a nice little helper script.

Download it or copy paste it:

#!/bin/bash

path_export="EXPORTPATH"
remove=( "/export.sh" )


rm -r --force $path_export
svn export . $path_export


for i in "${remove[@]}"
do
    echo $i
    rm -r --force $path_export$i
done

Add any files or directories you want to delete from the exported version to the fourth line like this:

remove=( "export.sh" "another_file.txt" "a_directory" )

Let me know, if you have any suggestions, improvements or if you just like it in the comments.

Leave a Reply

Your email address will not be published. Required fields are marked *