Commit 291d0c97 authored by Derek Stavis's avatar Derek Stavis

bundle.add: fix theme being persisted twice

`omf theme` was persisting the installed theme twice, one time on
`omf.install` and other time on `omf.bundle.add`.
parent 3c5406ab
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