Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etercifs
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etercifs
Commits
ac75de6b
Commit
ac75de6b
authored
Jan 30, 2018
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update_git.sh: add update local sources too (with -u)
parent
3d87e5e7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
7 deletions
+40
-7
update_git.sh
develop/update_git.sh
+40
-7
No files found.
develop/update_git.sh
View file @
ac75de6b
...
@@ -8,17 +8,51 @@ fatal()
...
@@ -8,17 +8,51 @@ fatal()
exit
1
exit
1
}
}
SOURCESDIR
=
$(
realpath
../sources
)
ECSOURCE
=
../../etercifs-source
ECSOURCE
=
../../etercifs-source
MERGEOPT
=
"--no-edit"
MERGEOPT
=
"--no-edit"
UPDATE
=
''
if
[
"
$1
"
=
"-u"
]
;
then
UPDATE
=
"
$1
"
shift
fi
MV
=
"
$1
"
MV
=
"
$1
"
[
-n
"
$MV
"
]
||
fatal
"Run with version, f.i. ./update_git.sh 4.11"
[
-n
"
$MV
"
]
||
fatal
"Run with version, f.i. ./update_git.sh 4.11
or ./update_git.sh -u 4.11 for update local sources too
"
KTAG
=
v
$MV
KTAG
=
v
$MV
KBRANCH
=
linux-
$MV
.y
KBRANCH
=
linux-
$MV
.y
ELIST
=
"etersoft-common etersoft-share-flags etersoft-wine"
ELIST
=
"etersoft-common etersoft-share-flags etersoft-wine"
update_branch
()
{
LASTTAG
=
$(
git describe
--tags
upstream/
$KBRANCH
)
||
fatal
echo
"Just update branch
$KTAG
-etercifs to latest commit from
$KBRANCH
with tag
$LASTTAG
"
git checkout
$KTAG
-etercifs
||
fatal
#git merge $MERGEOPT upstream/$KBRANCH || fatal
git merge
$MERGEOPT
$LASTTAG
||
fatal
}
update_sources
()
{
[
-n
"
$UPDATE
"
]
||
return
local
MV
=
"
$1
"
local
LASTTAG
=
"
$2
"
echo
"Copying sources from branch
$MV
-etercifs to local dir ..."
local
TEXT
=
"update
$MV
up to
$LASTTAG
"
[
-d
"
$SOURCESDIR
/
$MV
"
]
||
TEXT
=
"add
$MV
branch (
$LASTTAG
)"
rm
-r
"
$SOURCESDIR
/
$MV
"
||
fatal
cp
-a
fs/cifs
"
$SOURCESDIR
/
$MV
"
||
fatal
cd
$SOURCESDIR
||
fatal
git commit
$MV
-m
"
$TEXT
"
||
fatal
}
if
[
!
-d
$ECSOURCE
]
;
then
if
[
!
-d
$ECSOURCE
]
;
then
cd
$(
dirname
$ECSOURCE
)
||
fatal
cd
$(
dirname
$ECSOURCE
)
||
fatal
git clone https://gitlab.eterfund.ru/etersoft/etercifs-source.git
||
fatal
git clone https://gitlab.eterfund.ru/etersoft/etercifs-source.git
||
fatal
...
@@ -32,12 +66,10 @@ git fetch upstream
...
@@ -32,12 +66,10 @@ git fetch upstream
git tag |
grep
"
$KTAG
"
||
fatal
"There is no
$KTAG
tag in the git repo."
git tag |
grep
"
$KTAG
"
||
fatal
"There is no
$KTAG
tag in the git repo."
if
git branch |
grep
-q
$KTAG
-etercifs
;
then
if
git branch |
grep
-q
$KTAG
-etercifs
;
then
LASTTAG
=
$(
git describe
--tags
upstream/
$KBRANCH
)
||
fatal
update_branch
echo
"Just update branch
$KTAG
-etercifs to latest commit from
$KBRANCH
with tag
$LASTTAG
"
update_sources
$MV
$LASTTAG
git checkout
$KTAG
-etercifs
||
fatal
#git merge $MERGEOPT upstream/$KBRANCH || fatal
git merge
$MERGEOPT
$LASTTAG
||
fatal
exit
exit
fi
fi
...
@@ -56,4 +88,5 @@ for i in $ELIST ; do
...
@@ -56,4 +88,5 @@ for i in $ELIST ; do
git merge
$MERGEOPT
$i
||
fatal
git merge
$MERGEOPT
$i
||
fatal
done
done
echo
"You are in branch
$MV
-etercifs, copy fs/cifs to "
update_branch
update_sources
$MV
$LASTTAG
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