Menu

TipsAndTricks

Michael Augustin

Tips and Tricks page

Which files are handled by BFM?

The option --show list all the names of the files, that are managed by BFM. In combination with -R 0 (or any other fixed number of directory levels) BFM searches some directory levels down.

bfm.sh --show -R 4

Searches 4 directory level down, starting from the actual directory and list all managed files, regardless of their state (missing, changed, uptodate, ...).

Can BFM check only certain files?

bfm.sh --show -R 4 | grep linux_arm | xargs bfm.sh -d

Depending on the grep command in the middle only matching files are checked and downloaded by the last BFM command.

How to include this check in Makefiles?

Here's an example of a Makefile depending on some big zip files:

BFM=bfm.sh -v

all: images

images: picture_dir1 picture_dir2

picture_dir1 picture_dir2: bigfiles.txt
    $(BFM) -d $@

Subdirectories on the server storage?

All files are downloaded from a single server directory, as specified by the config.SERVERDIR= entry in a bigfiles.txt file. This can be very ugly if you have a workarea with equally named subdirectories, that you like to manage. Example:

app01/lib
app02/lib
app03/lib

If you like to upload all three lib directories, you'll end up with 3 lib.<MD5> files, that only differ in their MD5. And after some month you have a huge number of lib.<MD5> files on the server.

There is an option -P <N> which specifies the number of parent directories to use also on the server. E.g.

bfm.sh -u -P 1 -D */lib

This upload all lib directories as directory archive but also puts the first parent directory in the server path. So that your lib.<MD5> files go into separate app01, app02, app03 directories.


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.