aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilo Casagrande <milo@ubuntu.com>2013-01-25 14:10:01 +0100
committerMilo Casagrande <milo@ubuntu.com>2013-01-25 14:10:01 +0100
commitfd16c76f2ab597be3613b04db26e286d3cd55965 (patch)
treea84bfab9eecd07c8aa622be37abe0ccae0f5f6b1
parent827d4c50a51663746a09620607735f38e651e764 (diff)
Fixed regular expression.
-rw-r--r--scripts/update-repos6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/update-repos b/scripts/update-repos
index e5aabb6..73a6539 100644
--- a/scripts/update-repos
+++ b/scripts/update-repos
@@ -8,7 +8,7 @@ import subprocess
# Match a directory that ends with .git, but not only .git
-GIT_DIRECTORY_ENDS = re.compile(".+\.git")
+GIT_DIRECTORY_ENDS = re.compile(".+\.git$")
def args_parser():
@@ -34,15 +34,17 @@ if __name__ == '__main__':
if args.user:
cmd_args = ["sudo", "-u", args.user, "-H"]
cmd_args += ["git", "fetch", "--all", "-q"]
+ repo_name = os.path.basename(root)
process = subprocess.Popen(cmd_args,
cwd=root,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
+ print "Updating '%s' repository..." % repo_name
p_out, p_err = process.communicate()
if process.returncode != 0:
print ("Error fetching updates for repository '%s'" % \
- os.path.basename(root))
+ repo_name)
else:
# git repositories always have a HEAD file, or it means they
# are empty.