# Note: This is usually a slapos git repository but it can be otherwise.
# Note: This is usually a slapos git repository but it can be otherwise.
# There needs to be at least one buildout file to point to (the entry point) which can extend other build files. See the buildout documentation if this is unclear.
# There needs to be at least one buildout file to point to (the entry point) which can extend other build files. See the buildout documentation if this is unclear.
#find $DISTRIB_TEMPLATES_DIR/debian_defaults/ -type f -name * -exec sed $ALL_REGEX {} + > $TMP_TARGET/debian/
#find "$DISTRIB_TEMPLATES_DIR"/debian_defaults/ -type f -name * -exec sed "$ALL_REGEX" {} + > "$TMP_TARGET"/debian/
# If a directory for the current software does not already exist in distrubion-specifics:
# If a directory for the current software does not already exist in distrubion-specifics:
# create it and copy the product of the templates in it,
# create it and copy the product of the templates in it,
# otherwise do nothing.
# otherwise do nothing.
# The files created form the templates are still available in $TMP_TARGET
# The files created form the templates are still available in $TMP_TARGET
if[!-d$DISTRIB_FILES_DIR];then
if[!-d"$DISTRIB_FILES_DIR"];then
mkdir-p$DISTRIB_FILES_DIR
mkdir-p"$DISTRIB_FILES_DIR"
cp-r$TMP_TARGET/*$DISTRIB_FILES_DIR/
cp-r"$TMP_TARGET"/*"$DISTRIB_FILES_DIR"/
# A file is created so that the cleaning script can reverse the action of the current script.
# A file is created so that the cleaning script can reverse the action of the current script.
echo-e"This file's only purpose is to tell the cleaning script to delete this directory.\nThere should not be such file in a manually crafted directory.\n">>$DISTRIB_FILES_DIR/.toclean-stamp
echo-e"This file's only purpose is to tell the cleaning script to delete this directory.\nThere should not be such file in a manually crafted directory.\n">>"$DISTRIB_FILES_DIR"/.toclean-stamp
# Nothing is done here, as 04backup_tarball.sh only modifies permissions in $RUN_BUILDOUT_DIR/go/ and backs up the $TARBALL_DIR (one do not want to delete the backup if it's not to create a new one).
# Nothing is done here, as 04backup_tarball.sh only modifies permissions in "$RUN_BUILDOUT_DIR"/go/ and backs up the "$TARBALL_DIR" (one do not want to delete the backup if it's not to create a new one).