mirror of
https://github.com/vbatts/freezing-octo-hipster.git
synced 2025-06-26 21:08:29 +00:00
dups: deduplication tool
This commit is contained in:
parent
5cbe83545d
commit
4619d4d8b7
2 changed files with 43 additions and 4 deletions
|
@ -3,11 +3,12 @@ package main
|
|||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"github.com/BurntSushi/toml"
|
||||
"net/url"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path"
|
||||
|
||||
"github.com/BurntSushi/toml"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -19,6 +20,10 @@ func main() {
|
|||
os.Exit(1)
|
||||
}
|
||||
|
||||
if len(*flSyncDir) > 0 {
|
||||
config.SyncDir = *flSyncDir
|
||||
}
|
||||
|
||||
_, err = EnsureDirExists(config.SyncDir)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
|
@ -47,10 +52,10 @@ func main() {
|
|||
cmd.Stdout = os.Stdout
|
||||
}
|
||||
|
||||
err = cmd.Run()
|
||||
if err != nil {
|
||||
err = cmd.Run()
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -82,6 +87,7 @@ type Mirror struct {
|
|||
}
|
||||
|
||||
var (
|
||||
flSyncDir = flag.String("dir", "", "directory to sync to (this flag overrides the url in the configuration file)")
|
||||
flConfigFile = flag.String("c", path.Join(os.Getenv("HOME"), ".slackware-sync.toml"), "config file for the sync")
|
||||
flQuiet = flag.Bool("q", false, "less output")
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue