aboutsummaryrefslogtreecommitdiff
path: root/main.go
blob: 27a4abbc0bc07ff330a12bf33c26ec449acd9c7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package main

import (
	"fmt"
	"os"
)

const (
	base = "/Users/ben/dotfiles"
	dest = "/Users/ben"
)

func main() {
	if len(os.Args) < 2 {
		fmt.Printf("usage: conf apply [files...]\n")
		os.Exit(1)
	}
	switch os.Args[1] {
	case "apply":
		if err := apply(os.Args[2:]); err != nil {
			fmt.Printf("%v\n", err)
			os.Exit(1)
		}
	default:
		fmt.Printf("unrecognized command: %s\n", os.Args[1])
		os.Exit(1)
	}
}