From: Roland Haeder Date: Mon, 18 Apr 2016 18:34:51 +0000 (+0200) Subject: Continued a bit: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2414793ffc4b1759bc5e8d9b4ec0a5b826e98fd9;p=jprojects-scripts.git Continued a bit: - line-feed is better LF (prevents converting under Windows all over again). - always copying .gitattribues is fine, .gitignore only on creation Signed-off-by: Roland Haeder --- diff --git a/.gitattributes b/.gitattributes index dfe0770..17cdcd5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,2 @@ -# Auto detect text files and perform LF normalization -* text=auto +# Use Linux/Uni* line-feed for new lines (prevents converting) +* text=lf diff --git a/cp-dist.sh b/cp-dist.sh index ad4d9b6..371d148 100755 --- a/cp-dist.sh +++ b/cp-dist.sh @@ -9,15 +9,18 @@ for project in ${LIST}; do continue elif [ -f "${JPROJECTS_HOME}/${project}/dist.sh" ] then - echo "$0: Copying dist.sh to '${project}' ..." + echo "$0: Copying dist.sh/.git* to '${project}' ..." cp -v dist.sh "${JPROJECTS_HOME}/${project}/" || exit 255 + cp -vu "${JPROJECTS_HOME}/jprojects-scripts/.gitattributes" "${JPROJECTS_HOME}/${project}" fi if [ -d "${JPROJECTS_HOME}/${project}" -a ! -d "${JPROJECTS_HOME}/${project}/docs" -o "$1" = "f" ] then echo "$0: GNU-ifying project '${project}' ..." mkdir --parent "${JPROJECTS_HOME}/${project}/docs" || exit 255 - cp -rpv docs/* "${JPROJECTS_HOME}/${project}/docs/" || exit 255 + cp -rpv ${JPROJECTS_HOME}/jprojects-scripts/docs/* "${JPROJECTS_HOME}/${project}/docs/" || exit 255 + cp -vu "${JPROJECTS_HOME}/jprojects-scripts/.gitignore" "${JPROJECTS_HOME}/${project}" + cp -vu "${JPROJECTS_HOME}/jprojects-scripts/.gitattributes" "${JPROJECTS_HOME}/${project}" cd "${JPROJECTS_HOME}/${project}" echo "$0: git add ..." git add docs || exit 255