2015-09-07 19:34:11 -03:00
|
|
|
function omf.bundle.add -a type name_or_url
|
2016-04-19 01:16:58 -07:00
|
|
|
set -l bundle $OMF_CONFIG/bundle
|
|
|
|
|
2016-04-19 00:34:33 -07:00
|
|
|
if test -L $OMF_CONFIG/bundle
|
2016-04-19 00:14:10 -07:00
|
|
|
set bundle (readlink $OMF_CONFIG/bundle)
|
|
|
|
end
|
|
|
|
|
2015-10-06 17:05:16 -03:00
|
|
|
set -l record "$type $name_or_url"
|
2015-09-03 19:50:20 +01:00
|
|
|
|
2015-10-06 17:05:16 -03:00
|
|
|
if test -f $bundle
|
|
|
|
if not grep $record $bundle > /dev/null 2>&1
|
|
|
|
echo $record >> $bundle
|
2015-09-03 19:50:20 +01:00
|
|
|
end
|
2015-10-06 17:05:16 -03:00
|
|
|
else
|
|
|
|
echo $record > $bundle
|
2015-09-03 19:50:20 +01:00
|
|
|
end
|
|
|
|
|
2015-10-06 17:05:16 -03:00
|
|
|
sort -u $bundle -o $bundle
|
2015-09-03 19:50:20 +01:00
|
|
|
end
|