Skip to content

Commit

Permalink
Bump to 1.0.2, add license and author
Browse files Browse the repository at this point in the history
  • Loading branch information
CGamesPlay committed Oct 30, 2019
1 parent dee6c11 commit 0976571
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 6 deletions.
12 changes: 12 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Copyright (c) 2019 Ryan Patterson

Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 changes: 11 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,21 +160,26 @@ Now ~/dotfiles can be tracked in source control, and to install on another machi
dfm init . --repos files
dfm link
Note that .dfm.toml is a per-machine configuration and should not be tracked in source control.`, 80),
Note that .dfm.toml is a per-machine configuration and should not be tracked in source control.
`, 80),
}
rootCmd.PersistentFlags().StringVarP(&dfmDir, "dfm-dir", "d", "", "directory where dfm repositories live")
rootCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "output every file, even unchanged ones")
rootCmd.PersistentFlags().BoolVarP(&dryRun, "dry-run", "n", false, "show what would happen, but don't actually modify files")
rootCmd.PersistentFlags().BoolVarP(&force, "force", "f", false, "overwrite files that already exist")

rootCmd.SetUsageTemplate(rootCmd.UsageTemplate() + "\n" + CopyrightString + "\n")

initCmd := &cobra.Command{
Use: "init",
Short: "Initialize the dfm directory",
Long: wordwrap.WrapString(`Initialize a directory to be used with dfm by creating the .dfm.toml file there.
Specifying --repos and --target will allow you to configure which repos are used and where the files should be stored. It is safe to run dfm init on an already-initialized dfm directory, to change the repos that are being used.`, 80),
Args: cobra.NoArgs,
Run: runInit,
Example: ` dfm init --repos files ~/dotfiles`,
Args: cobra.NoArgs,
Run: runInit,
}
initCmd.Flags().StringArrayVar(&cliOptions.Repos, "repos", nil, "repositories to track")
initCmd.Flags().StringVar(&cliOptions.Target, "target", "", "directory to sync files in")
Expand All @@ -195,8 +200,9 @@ Specifying --repos and --target will allow you to configure which repos are used
})

addCmd := &cobra.Command{
Use: "add",
Short: "Begin tracking files",
Use: "add [files]",
Aliases: []string{"import"},
Short: "Begin tracking files",
Long: wordwrap.WrapString(`Copy the given files into the repository and replace the originals with links to the tracked files.
If no repo is specified in the command, the repo that is listed last will be used.`, 80),
Expand Down
6 changes: 5 additions & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
package main

// Version is the version of the running dfm.
const Version = "1.0.0"
const Version = "1.0.2"

// CopyrightString is used to show the license and author in help messages.
const CopyrightString = `dfm, by Ryan Patterson, 2019
Distributed under the zero-clause BSD license.`

0 comments on commit 0976571

Please sign in to comment.