2015-08-29 09:35:17 +00:00
|
|
|
function omf.describe -a name
|
|
|
|
if test (count $argv) -eq 0
|
|
|
|
for package in (omf.list_db_packages)
|
|
|
|
echo $package - (omf.describe $package)
|
|
|
|
end
|
|
|
|
else
|
|
|
|
set package_path $OMF_PATH/db/pkg/$name
|
|
|
|
if test -e $package_path
|
|
|
|
set url (cat $package_path)
|
|
|
|
set repo (basename (dirname $url))/(basename $url)
|
2015-08-31 20:37:56 +00:00
|
|
|
curl -s https://api.github.com/repos/$repo 2>/dev/null | grep \"description\" | head -1 | cut -d':' -f2- | sed -e 's/["|,]//g;s/^[ \t]//g'
|
2015-08-29 09:35:17 +00:00
|
|
|
else
|
|
|
|
echo (omf::err)"$name is not a valid pkg."(omf::off) 1^&2
|
|
|
|
return $OMF_INVALID_ARG
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|