Browse Source

vcs_update: improve the case when it's run without arguments

Signed-off-by: Alejandro Mery <amery@geeks.cl>
master
Alejandro Mery 10 years ago
parent
commit
c40428a912
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      files/bin/vcs_update

+ 7
- 1
files/bin/vcs_update

@ -38,7 +38,13 @@ update_repo() {
cd - > /dev/null
}
[ $# -gt 0 ] || set -- .
if [ $# -eq 0 ]; then
if git rev-parse --is-inside-work-tree > /dev/null; then
set -- "$(git rev-parse --show-toplevel)"
else
set -- .
fi
fi
for d; do
if [ -e "$d/.git" ]; then

Loading…
Cancel
Save