Merge pull request #110 from derekstavis/fix-bundle-add

bundle.add: fix theme being persisted twice
This commit is contained in:
Bruno 2015-10-06 21:39:12 +01:00
commit 284b318cb8

View File

@ -1,7 +1,6 @@
function omf.bundle.add -a type name_or_url
function __omf.write_bundle
set -l bundle $OMF_CONFIG/bundle
set -l record $argv
set -l record "$type $name_or_url"
if test -f $bundle
if not grep $record $bundle > /dev/null 2>&1
@ -12,14 +11,4 @@ function omf.bundle.add -a type name_or_url
end
sort -u $bundle -o $bundle
end
function __omf.write_theme
echo $argv > $OMF_CONFIG/theme
end
__omf.write_bundle "$type" "$name_or_url"
if test "$type" = theme
__omf.write_theme "$name_or_url"
end
end