Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
korinf
etersoft-build-utils
Commits
e39b9279
Commit
e39b9279
authored
Feb 06, 2010
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move get_root_git_dir to common module,
add in is_gear file path support
parent
dd6a203d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
13 deletions
+15
-13
common
share/eterbuild/functions/common
+15
-1
git
share/eterbuild/functions/git
+0
-12
No files found.
share/eterbuild/functions/common
View file @
e39b9279
...
...
@@ -59,10 +59,24 @@ print_list()
done
}
get_root_git_dir
()
{
local
DIR
=
"
$1
"
[
-n
"
$DIR
"
]
||
DIR
=
$(
pwd
)
[
"
$DIR
"
=
"/"
]
&&
return
1
if
[
-d
"
$DIR
/.git"
]
;
then
readlink
-f
"
$DIR
"
return
fi
get_root_git_dir
$(
dirname
"
$DIR
"
)
||
return
1
}
# Usage: is_gear [path_to_spec|dir_inside_git]
is_gear
()
{
local
DIR
=
$1
local
DIR
=
"
$1
"
[
-z
"
$IGNOREGEAR
"
]
||
return
1
[
-f
"
$DIR
"
]
&&
DIR
=
$(
dirname
"
$DIR
"
)
local
GITDIR
=
$(
get_root_git_dir
"
$DIR
"
)
[
-d
"
$GITDIR
/.gear"
]
&&
return
0
[
-r
"
$GITDIR
/.gear-rules"
]
&&
return
0
...
...
share/eterbuild/functions/git
View file @
e39b9279
...
...
@@ -20,18 +20,6 @@ get_current_branch()
git branch |
grep
'^\*'
|
sed
's/^..//'
|
tr
-d
"
\n
"
}
get_root_git_dir
()
{
local
DIR
=
"
$1
"
[
-n
"
$DIR
"
]
||
DIR
=
$(
pwd
)
[
"
$DIR
"
=
"/"
]
&&
return
1
if
[
-d
"
$DIR
/.git"
]
;
then
readlink
-f
"
$DIR
"
return
fi
get_root_git_dir
$(
dirname
"
$DIR
"
)
||
return
1
}
get_remote_git_list
()
{
local
i
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment