Report up-to-date packages as such

This commit is contained in:
Itzik Ephraim 2016-01-14 23:32:12 +02:00
parent f6b9bdd941
commit 720c499e61

View File

@ -1,19 +1,24 @@
function omf.packages.update -a name
if set target_path (omf.packages.path $name)
# Skip packages outside version control
not test -e $target_path/.git;
and return 0
if omf.repo.pull $target_path
omf.bundle.install $target_path/bundle
echo (omf::em)"$name successfully updated."(omf::off)
return 0
else
echo (omf::err)"Could not update $name."(omf::off) 1^&2
end
else
echo (omf::err)"Could not find $name."(omf::off) 1^&2
if not set target_path (omf.packages.path $name)
echo (omf::err)"Could not find $name."(omf::off) 1>&2
return 1
end
return 1
# Skip packages outside version control
not test -e $target_path/.git;
and return 0
omf.repo.pull $target_path
switch $status
case 0
omf.bundle.install $target_path/bundle
echo (omf::em)"$name successfully updated."(omf::off)
case 1
echo (omf::err)"Could not update $name."(omf::off) 1>&2
return 1
case 2
echo (omf::dim)"$name is already up-to-date."(omf::off)
end
return 0
end