]> git.mxchange.org Git - jprojects-scripts.git/commitdiff
Continued a bit:
authorRoland Haeder <roland@mxchange.org>
Mon, 18 Apr 2016 18:34:51 +0000 (20:34 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 18 Apr 2016 18:34:51 +0000 (20:34 +0200)
- 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 <roland@mxchange.org>
.gitattributes
cp-dist.sh

index dfe0770424b2a19faf507a501ebfc23be8f54e7b..17cdcd5373ad22f616149f35b61236dfe81ebec3 100644 (file)
@@ -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
index ad4d9b6e328bbb118a91df9d48cf1e66b1b85561..371d148d3be278f9ab6cca195bd464900a548378 100755 (executable)
@@ -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