Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel393
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
elphel393
Commits
1445e953
Commit
1445e953
authored
Sep 15, 2020
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
python 3 and 2 compatible
parent
d365d13f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
setup.py
setup.py
+10
-12
No files found.
setup.py
View file @
1445e953
#!/usr/bin/env python3
# Clones and sets up and updates everything, also creates local.conf
'''
Copyright 2020, Elphel Inc.
SPDX-License-Identifier: GPL-3.0-or-later
__author__
=
"Elphel"
__copyright__
=
"Copyright 2016, Elphel, Inc."
__license__
=
"GPL"
__version__
=
"3.0+"
__maintainer__
=
"Oleg K Dzhimiev"
__email__
=
"oleg@elphel.com"
__status__
=
"Development"
Author: Oleg Dzhimiev <oleg@elphel.com>
Description: Clones and sets up and updates everything, also creates local.conf
'''
import
subprocess
import
os
...
...
@@ -58,7 +56,7 @@ def cloneandcheckout(name,item):
cwd
=
os
.
getcwd
()
os
.
chdir
(
cwd
+
"/"
+
name
)
read_remote
=
subprocess
.
check_output
(
"git remote -v"
,
shell
=
True
)
read_remote
=
subprocess
.
check_output
(
"git remote -v"
,
shell
=
True
)
.
decode
(
'utf-8'
)
if
read_remote
.
find
(
item
[
0
])
==-
1
:
print
(
bcolors
.
WARNING
+
"Changing git remote to "
+
item
[
0
]
+
bcolors
.
ENDC
)
shout
(
"git remote set-url origin "
+
item
[
0
])
...
...
@@ -176,10 +174,10 @@ def update_branch(names_from_conf,name_from_list,pars,git_proto):
#self pull?
print
(
bcolors
.
BOLDWHITE
+
"Step 0: Running self git pull"
+
bcolors
.
ENDC
)
selfpullresult
=
subprocess
.
check_output
(
"git pull"
,
shell
=
True
)
selfpullresult
=
subprocess
.
check_output
(
"git pull"
,
shell
=
True
)
.
strip
()
.
decode
(
'utf-8'
)
if
selfpullresult
.
strip
()
.
decode
(
'utf-8'
)
!=
"Already up-to-date."
and
\
selfpullresult
.
strip
()
.
decode
(
'utf-8'
)
!=
"Already up to date."
:
if
selfpullresult
!=
"Already up-to-date."
and
\
selfpullresult
!=
"Already up to date."
:
print
(
bcolors
.
WARNING
+
"Wasn't up-to-date. Please, rerun ./setup.py"
+
bcolors
.
ENDC
)
sys
.
exit
()
else
:
...
...
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