cmd

package
v0.0.0-...-87a2a3b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "dbkp",
	Short: "A simple dotfiles backup solution",
	Long: `dbkp allows you to backup and restore dotfiles with ease.

    Create the configuration file to specify what files and folders you want to
    keep track of, then run "dbkp backup" to backup and "dbkp restore" to
    restore into a subfolder where the configuration file is. That simple. Pair
    it with git for version control.

    For example to backup fish and you bin folder into Dropbox:
      mkdir ~/Documents/Dropbox/dotfiles
      cd ~/Documents/Dropbox/dotfiles
      dbkp init
      dbkp add ~/.config/fish
      dbkp add ~/bin
      dbkp backup
    `,
	Run: func(cmd *cobra.Command, args []string) {
		version, err := cmd.Flags().GetBool("version")
		if err != nil {
			fmt.Fprintf(os.Stderr, "Could not parse options: %s\n", err)
			os.Exit(1)
		}

		if version {
			fmt.Printf("Version %s", dbkp.Version)
		} else {
			cmd.Help()
		}
	},
}

Functions

func Execute

func Execute()

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL