Example #1
0
func doBundle(ctx *cli.Context) {
	if readFromStdin() {
		entries, _ := ioutil.ReadAll(os.Stdin)
		antibody.New(
			bundle.Parse(string(entries), antibody.Home()),
		).Download()
	} else {
		antibody.New(
			[]bundle.Bundle{bundle.New(ctx.Args().First(), antibody.Home())},
		).Download()
	}
}
Example #2
0
func TestBundleAndUpdate(t *testing.T) {
	home := internal.TempHome()
	defer os.RemoveAll(home)
	a := antibody.New([]bundle.Bundle{
		bundle.New("caarlos0/zsh-pg", home),
		bundle.New("caarlos0/zsh-open-pr", home),
	})
	a.Download()
	a.Update()
	internal.AssertFileCount(t, 2, home)
}
Example #3
0
package command

import (
	"github.com/codegangsta/cli"
	"github.com/getantibody/antibody"
	"github.com/getantibody/antibody/bundle"
)

// Update all previously bundled bundles
var Update = cli.Command{
	Name:  "update",
	Usage: "updates all previously bundled commands",
	Action: func(ctx *cli.Context) {
		antibody.New(bundle.List(antibody.Home())).Update()
	},
}