This is an automated email from the ASF dual-hosted git repository.
wave pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/openoffice-org.git
The following commit(s) were added to refs/heads/main by this push:
new 6c8cf46 Separate git push from git add and commit.
6c8cf46 is described below
commit 6c8cf4617e559af38c7bd3608903e0588f67df9a
Author: Dave Fisher <[email protected]>
AuthorDate: Sun Nov 1 12:10:09 2020 -0800
Separate git push from git add and commit.
---
tools/README.md | 26 ++++++++++++++++++--------
tools/{push2git.sh => commit2git.sh} | 3 +--
tools/migration2git.sh | 17 ++++++++++-------
tools/push2git.sh | 11 +++--------
4 files changed, 32 insertions(+), 25 deletions(-)
diff --git a/tools/README.md b/tools/README.md
index 3548f33..1799b7a 100644
--- a/tools/README.md
+++ b/tools/README.md
@@ -80,7 +80,7 @@ ${GITPATH}/tools/migration2git.sh downloads
## Tool Scripts
-1. tools/push2git.sh ${1} ${2} ${3}
+1. tools/commit2git.sh ${1} ${2} ${3}
```
# ${1} Category 'assets','content'
@@ -89,7 +89,6 @@ ${GITPATH}/tools/migration2git.sh downloads
cd ${GITPATH}
git add ${1}/${2}
git commit -m 'Migration of ${2} ${3}'
-git push
```
2. tools/convert2md.sh ${1} ${2}
@@ -115,32 +114,43 @@ find ${1} -type d ! -empty -exec mkdir -p
${GITPATH}/assets/{} \; -exec mkdir -p
echo
# 2 - Large Assets
echo 'copy assets larger than 3M as separate commits'
-find ${1} -type f -size +3M -exec cp {} ${GITPATH}/assets/{} \; -exec
${GITPATH}/tools/push2git.sh assets {} 'large asset'\;
+find ${1} -type f -size +3M -exec cp {} ${GITPATH}/assets/{} \; -exec
${GITPATH}/tools/commit2git.sh assets {} 'large asset' \;
echo
# 3 - Assets
echo 'copy assets not (html and mdtext) to assets tree'
find ${1} -type f ! -name "*.html" ! -name "*.htm" ! -name "*.mdtext" ! -size
+3M -exec cp -p {} ${GITPATH}/assets/{} \;
# commit and push
-${GITPATH}/tools/push2git.sh assets ${1} 'assets'
+${GITPATH}/tools/commit2git.sh assets ${1} 'assets'
echo
# 4 - HTML
echo 'copy html to content tree'
find ${1} -type f \( -name "*.html" -or -name "*.htm" \) ! -size +3M -exec cp
-p {} ${GITPATH}/content/{} \;
# commit and push
-${GITPATH}/tools/push2git.sh content ${1} 'html content'
+${GITPATH}/tools/commit2git.sh content ${1} 'html content'
echo
# 5 - Brand
echo 'Convert brand'
-find ${1} -name "brand.mdtext" -type f -exec ${GITPATH}/tools/convert2md.sh
brand {} \; -exec ${GITPATH}/tools/push2git.sh assets {} 'brand'\;
+find ${1} -name "brand.mdtext" -type f -exec ${GITPATH}/tools/convert2md.sh
brand {} \; -exec ${GITPATH}/tools/commit2git.sh assets {} 'brand' \;
echo
# 6 - Navigators
echo 'Convert navigators'
-find ${1} -name "*nav.mdtext" -type f -exec ${GITPATH}/tools/convert2md.sh
navigator {} \; -exec ${GITPATH}/tools/push2git.sh assets {} 'navigator'\;
+find ${1} -name "*nav.mdtext" -type f -exec ${GITPATH}/tools/convert2md.sh
navigator {} \; -exec ${GITPATH}/tools/commit2git.sh assets {} 'navigator' \;
echo
# 7 - Markdown
echo 'Convert markdown pages'
find ${1} -name "*.mdtext" ! -name "brand.mdtext" ! -name "*nav.mdtext" -type
f -exec ${GITPATH}/tools/convert2md.sh page {} \;
# commit and push
-${GITPATH}/tools/push2git.sh content ${1} 'Markdown pages'
+${GITPATH}/tools/commit2git.sh content ${1} 'Markdown pages'
echo
+# 8 - Push to git
+echo 'Push to Gitbox'
+${GITPATH}/tools/push2git.sh
+```
+
+4. tools/push2git.sh
+
```
+cd ${GITPATH}
+git push
+```
+
diff --git a/tools/push2git.sh b/tools/commit2git.sh
similarity index 96%
copy from tools/push2git.sh
copy to tools/commit2git.sh
index a560363..e163089 100755
--- a/tools/push2git.sh
+++ b/tools/commit2git.sh
@@ -18,7 +18,7 @@
# under the License.
#
-# tools/push2git.sh ${1} ${2} ${3}
+# tools/commit2git.sh ${1} ${2} ${3}
# ${1} Category 'assets','content'
# ${2} Path to commit
# ${3} Description for commit message - 'assets','large asset','html
content','Markdown pages','brand','navigator'
@@ -31,4 +31,3 @@ fi
cd ${GITPATH}
git add ${1}/${2}
git commit -m '"Migration of "${2}" "${3}'
-git push
diff --git a/tools/migration2git.sh b/tools/migration2git.sh
index 8906a9d..6bef449 100755
--- a/tools/migration2git.sh
+++ b/tools/migration2git.sh
@@ -36,32 +36,35 @@ find ${1} -type d ! -empty -exec mkdir -p
${GITPATH}/assets/{} \; -exec mkdir -p
echo
# 2 - Large Assets
echo 'copy assets larger than 3M as separate commits'
-find ${1} -type f -size +3M -exec cp {} ${GITPATH}/assets/{} \; -exec
${GITPATH}/tools/push2git.sh assets {} 'large asset' \;
+find ${1} -type f -size +3M -exec cp {} ${GITPATH}/assets/{} \; -exec
${GITPATH}/tools/commit2git.sh assets {} 'large asset' \;
echo
# 3 - Assets
echo 'copy assets not (html and mdtext) to assets tree'
find ${1} -type f ! -name "*.html" ! -name "*.htm" ! -name "*.mdtext" ! -size
+3M -exec cp -p {} ${GITPATH}/assets/{} \;
# commit and push
-${GITPATH}/tools/push2git.sh assets ${1} 'assets'
+${GITPATH}/tools/commit2git.sh assets ${1} 'assets'
echo
# 4 - HTML
echo 'copy html to content tree'
find ${1} -type f \( -name "*.html" -or -name "*.htm" \) ! -size +3M -exec cp
-p {} ${GITPATH}/content/{} \;
# commit and push
-${GITPATH}/tools/push2git.sh content ${1} 'html content'
+${GITPATH}/tools/commit2git.sh content ${1} 'html content'
echo
# 5 - Brand
echo 'Convert brand'
-find ${1} -name "brand.mdtext" -type f -exec ${GITPATH}/tools/convert2md.sh
brand {} \; -exec ${GITPATH}/tools/push2git.sh content {} 'brand' \;
+find ${1} -name "brand.mdtext" -type f -exec ${GITPATH}/tools/convert2md.sh
brand {} \; -exec ${GITPATH}/tools/commit2git.sh content {} 'brand' \;
echo
# 6 - Navigators
echo 'Convert navigators'
-find ${1} -name "*nav.mdtext" -type f -exec ${GITPATH}/tools/convert2md.sh
navigator {} \; -exec ${GITPATH}/tools/push2git.sh content {} 'navigator' \;
+find ${1} -name "*nav.mdtext" -type f -exec ${GITPATH}/tools/convert2md.sh
navigator {} \; -exec ${GITPATH}/tools/commit2git.sh content {} 'navigator' \;
echo
# 7 - Markdown
echo 'Convert markdown pages'
find ${1} -name "*.mdtext" ! -name "brand.mdtext" ! -name "*nav.mdtext" -type
f -exec ${GITPATH}/tools/convert2md.sh page {} \;
# commit and push
-${GITPATH}/tools/push2git.sh content ${1} 'Markdown pages'
+${GITPATH}/tools/commit2git.sh content ${1} 'Markdown pages'
+echo
+# 8 - Push to git
+echo 'Push to Gitbox'
+${GITPATH}/tools/push2git.sh
echo
-
diff --git a/tools/push2git.sh b/tools/push2git.sh
index a560363..055ea58 100755
--- a/tools/push2git.sh
+++ b/tools/push2git.sh
@@ -18,17 +18,12 @@
# under the License.
#
-# tools/push2git.sh ${1} ${2} ${3}
-# ${1} Category 'assets','content'
-# ${2} Path to commit
-# ${3} Description for commit message - 'assets','large asset','html
content','Markdown pages','brand','navigator'
+# tools/push2git.sh
-if test "$#" != 3; then
- echo "USAGE: $0 Category Path Description"
+if test "$#" != 0; then
+ echo "USAGE: $0"
exit 1
fi
cd ${GITPATH}
-git add ${1}/${2}
-git commit -m '"Migration of "${2}" "${3}'
git push