Commit 284b318c authored by Bruno's avatar Bruno

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

bundle.add: fix theme being persisted twice
parents 3c5406ab 291d0c97
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 bundle $OMF_CONFIG/bundle
set -l record "$type $name_or_url"
if test -f $bundle
if not grep $record $bundle > /dev/null 2>&1
echo $record >> $bundle
end
else
echo $record > $bundle
if test -f $bundle
if not grep $record $bundle > /dev/null 2>&1
echo $record >> $bundle
end
sort -u $bundle -o $bundle
end
function __omf.write_theme
echo $argv > $OMF_CONFIG/theme
else
echo $record > $bundle
end
__omf.write_bundle "$type" "$name_or_url"
if test "$type" = theme
__omf.write_theme "$name_or_url"
end
sort -u $bundle -o $bundle
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment