All Downloads are FREE. Search and download functionalities are using the official Maven repository.

refcodes-batch.1.0.2.source-code.clone-folder-template.job Maven / Gradle / Ivy

There is a newer version: 1.0.5
Show newest version
#!/bin/bash

. $SCRIPT_DIR/lib-filesystem.inc

if [[ $HELP = y ]] ; then
	echo "The switch \"-j $JOB\" uses a given configuration to                            " >&2
	echo "clone template folder to a (target) folder.                                     " >&2
	# echo "--------------------------------------------------------------------------------" >&2
	logSeparator
fi

. $SCRIPT_DIR/validate-folder-config.job
. $SCRIPT_DIR/validate-folder-template-config.job

if [[ $HELP = y ]] ; then
	exit $EXIT_SUCCESS
fi

exitOnConfigOff "FOLDER"
exitOnConfigOff "FOLDER_TEMPLATE"

if [[ $VERBOSE = y ]] ; then
	echo "Cloning folder \"$FOLDER_TEMPLATE_DIR\" to \"$FOLDER_DIR\" ..." >&2
	logSeparator
fi

cp -aR $FOLDER_TEMPLATE_DIR $FOLDER_DIR
exitOnError "Unable to clone folder \"$FOLDER_TEMPLATE_DIR\" to \"$FOLDER_DIR\" !!!"

echo " Folder clone at \"$FOLDER_DIR\" from  \"$FOLDER_TEMPLATE_DIR\" was created:" >&2
# echo "--------------------------------------------------------------------------------" >&2
logSeparator
echo "+ Folder clone details see: \"$FOLDER_DIR\"" >&2
# echo "--------------------------------------------------------------------------------" >&2
logSeparator

showSuccess "Cloned \"$FOLDER_TEMPLATE_DIR\" to \"$FOLDER_DIR\" !"




© 2015 - 2024 Weber Informatics LLC | Privacy Policy