I have a working rsync script, which recursively traverses our directory structure and loads one .publish
file per directory. Each file contains a list of files to be publish. Publish means to copy files from an internal, not fully open source git repository to a full open-source repository. The destination folder (called export) is then pushed to GitHub. This way was chosen, because either we have not all rights on the files to publish them, or some files need a rework before going public :).
A .publish
file looks like this one:
# git files.gitempty# DocumentationREADME.md# Packagesync.pkg.vhdl# Clock-Domain-Crossing (CDC) circuitssync_Bits.filessync_Bits.vhdlsync_Reset.filessync_Reset.vhdlsync_Strobe.filessync_Strobe.vhdlsync_Vector.filessync_Vector.vhdlsync_Command.filessync_Command.vhdl# Altera specific implementationssync_Bits_Altera.vhdlsync_Reset_Altera.vhdl# Xilinx specific implementationssync_Bits_Xilinx.vhdlsync_Reset_Xilinx.vhdl
I'm looking for a possibility to merge the *.vhdl
and *.files
lines into one line, by using something like: sync_Command\.(vhdl|files)
(regexp syntax).
I searched the rsync man page, but I just found the *
wildcard, which seems to be a bit to general.
Is there a possibility to specify multiple file extensions per line?
This is my rsync command line:
rsyncOptions=( \ --archive \ --itemize-changes \ --human-readable \ --verbose \'--filter=:en+ .publish' \'--filter=- *' \'--filter=P .git' \'--filter=P .gitmodules' \'--filter=P lib/*' \ --delete --delete-excluded --prune-empty-dirs \ --stats)rsync "${rsyncOptions[@]}""$src/""$dst/"