aboutsummaryrefslogtreecommitdiff
path: root/source/ks/framework
ModeNameSize
d---------source77logplain
us-rebased LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/g
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-10-01 23:48:10 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-10-16 11:28:26 -0500
commit9152c42a65c199893d2d2809153a709bd2f619f8 (patch)
treedd15a0949c52ded5c71262188f83f70eed45814e /g
parent074bb522927c60f2575fdc5bcb83eb17a4dfc4b7 (diff)
submodules migration
Change-Id: Ib3e472a4b1abf880f695be7a6667393d6a82f10d
Diffstat (limited to 'g')
-rwxr-xr-xg587
1 files changed, 228 insertions, 359 deletions
diff --git a/g b/g
index a82fc313c2db..d73b8a6052fa 100755
--- a/g
+++ b/g
@@ -3,116 +3,207 @@
# Wrapper for git to handle more subdirs at the same time
#
-# no params, no action
-if [ "$#" -eq "0" ] ; then
- git
- echo
- echo "Additional options available only in this 'g' wrapper:"
- echo
- echo "Usage: g [options] [git commands]"
- echo " -f Force - act on all the repos, not only the changed ones"
- echo " -s Silent - do not report the repo names."
- echo " -v Verbose - Print git commands."
- echo " -1 report the repos name on the first line of the output as <repo>:"
- echo " -z just to some house cleaning (hooks mostly). this is a stand-alone option as in ./g -z"
- echo " --set-push-user [username] re-write an existing tree's config with an fd.o commit account name"
- echo " --last-working checks out the last known working build (useful for windows)";
- echo " --set-last-working adds a note denoting a working build";
- echo " --push-notes pushes all notes";
- exit $?
+if [ -n "$g_debug" ] ; then
+ set -x
fi
-if [ ! "`type -p git`" ]; then
- echo "Cannot find the git binary! Is git installed and is in PATH?"
- exit 1
-fi
+SUBMODULES_ALL="binfilter dictionaries helpcontent2 translations"
pushd $(dirname $0) > /dev/null
COREDIR=$(pwd)
popd > /dev/null
-if test -f $COREDIR/bin/repo-list
-then
- ALLREPOS="core `cat "$COREDIR/bin/repo-list"`"
-else
- ALLREPOS=core
-fi
+usage()
+{
+ git
+ echo
+ echo "Usage: g [options] [git (checkout|clone|fetch|grep|pull|push|reset) [git options/args..]]"
+ echo ""
+ echo " -z restaure the git hooks and others sanity checks"
+}
-refresh_hooks()
+refresh_submodule_hooks()
{
- repo=$1
- case "$repo" in
- core)
- pushd $COREDIR > /dev/null
- for hook_name in $(ls -1 $COREDIR/git-hooks) ; do
- hook=".git/hooks/$hook_name"
- if [ ! -x "$hook" ] ; then
- rm -f "$hook"
- ln -sf "$COREDIR/git-hooks/$hook_name" "$hook"
- fi
- done
- popd > /dev/null
- ;;
- translations)
- if [ -d $COREDIR/clone/translations ] ; then
- pushd $COREDIR/clone/translations > /dev/null
- for hook_name in $(ls -1 $COREDIR/clone/translations/git-hooks); do
- hook=".git/hooks/$hook_name"
- if [ ! -x "$hook" ] ; then
- rm -f "$hook"
- ln -sf "$COREDIR/clone/translations/git-hooks/$hook_name" "$hook"
- fi
- done
- # .gitattribute should be per-repo, avoid entangling repos
- if [ -L .gitattributes ] ; then
- rm -f .gitattributes
- fi
- popd > /dev/null
- fi
- ;;
- binfilter|help|dictionaries)
- if [ -d $COREDIR/clone/$repo ] ; then
- pushd $COREDIR/clone/$repo > /dev/null
- # fixme: we should really keep these per-repo to
- # keep the repos independant. since these two
- # are realy not independant yet, we keep using core's hooks
- for hook_name in $(ls -1 $COREDIR/git-hooks) ; do
- hook=".git/hooks/$hook_name"
- if [ ! -x "$hook" ] ; then
- rm -f "$hook"
- ln -sf "$COREDIR/git-hooks/$hook_name" "$hook"
- fi
- done
- # .gitattribute should be per-repo, avoid entangling repos
- if [ -L .gitattributes ] ; then
- rm -f .gitattributes
- fi
- popd > /dev/null
+local repo=$1