My script should check a directory called /etc/scriptbuilder/default/contents which will hold some directories, if a directory in the contents directory matches one in the project directory the files in the contents directory should be copied to the project directory (so, if /etc/scriptbuilder/default/contents/docs and /project/docs both exist, the contents of /etc/scriptbuilder/default/contents/docs should be copied).
I'm having trouble making this work. It has to find a match of the same directory name and copy the contents over from the contents directory to the project directory if they have the same directory name. This is what I have so far:
#! /bin/bash
if [ -d "$/etc/scriptbuilder/default/contents ]; then
if [[ "/etc/scriptbuilder/default/contents" =~ name ]]; then
cp -a #I'm not sure how to copy and check for the name on the project
directory
fi
fi