Skip to content

Instantly share code, notes, and snippets.

@Dih5
Created March 14, 2016 17:26
Show Gist options
  • Save Dih5/6e119bd00655d61e08d3 to your computer and use it in GitHub Desktop.
Save Dih5/6e119bd00655d61e08d3 to your computer and use it in GitHub Desktop.
Copies some FLUKA-relevant files from originDir into destinationDir, keeping the directory structure as seen from pwd.
#!/bin/bash
if [ "$#" -eq "2" ]; then
find $1 -type f \( -name '*.lis' -o -name '*.inp' -o -name '*.bnn' -o -name '*.bin' -o -name '*.flair' \) -exec install -D {} `readlink -f $2`/{} \;
else
echo -e "Usage: cpfluka originDir destinationDir\nCopies some FLUKA-relevant files from originDir into destinationDir, keeping the directory structure as seen from pwd.";
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment