2015-09-07 22:34:11 +00:00
|
|
|
function omf.bundle.remove
|
|
|
|
set bundle $OMF_CONFIG/bundle
|
|
|
|
|
|
|
|
if test -f $bundle
|
|
|
|
set type $argv[1]
|
|
|
|
set name $argv[2]
|
2015-09-11 17:51:35 +00:00
|
|
|
set bundle_contents (cat $bundle | sort -u)
|
2015-09-07 22:34:11 +00:00
|
|
|
|
|
|
|
rm -f $bundle
|
|
|
|
|
|
|
|
for record in $bundle_contents
|
|
|
|
set record_type (echo $record | cut -d' ' -f1)
|
|
|
|
set record_name (echo $record | cut -d' ' -f2-)
|
|
|
|
set record_basename (basename (echo $record_name | \
|
|
|
|
sed -e 's/\.git$//') | sed 's/^pkg-//;s/^plugin-//;s/^theme-//')
|
|
|
|
|
|
|
|
if not test "$type" = "$record_type" -a "$name" = "$record_basename"
|
|
|
|
echo "$record_type $record_name" >> $bundle
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2015-09-11 17:52:04 +00:00
|
|
|
|
|
|
|
return 0
|
2015-09-07 22:34:11 +00:00
|
|
|
end
|