From 4cb46371143cf97ad5ec5187d834ef9b85181abf Mon Sep 17 00:00:00 2001 From: Hugo Thunnissen Date: Fri, 8 Apr 2022 18:18:20 +0200 Subject: [PATCH] Add gitignore --- git/ignore | 4 ++++ main.go | 15 +++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 git/ignore diff --git a/git/ignore b/git/ignore new file mode 100644 index 0000000..f436b99 --- /dev/null +++ b/git/ignore @@ -0,0 +1,4 @@ +/.cache +.\#* +\#*\# +*~ diff --git a/main.go b/main.go index d30ddcb..b99ac74 100644 --- a/main.go +++ b/main.go @@ -36,6 +36,8 @@ var bashAliases string //go:embed git/config var gitConfig string +//go:embed git/ignore +var gitIgnore string var ErrAddUserFailExit = errors.New("useradd command returned no-zero exit code") var ErrAddGroupFailExit = errors.New("groupadd command returned no-zero exit code") @@ -307,11 +309,11 @@ func main() { elispThemeDir := home + "/.workspace/elisp-themes" if _, err := os.Stat(elispThemeDir); os.IsNotExist(err) { - err = os.MkdirAll(elispThemeDir, 0600) + err = os.MkdirAll(elispThemeDir, 0755) if err != nil { fmt.Fprintln( os.Stderr, - "Failed to create elisp theme dir in" + elispThemeDir, + "Failed to create elisp theme dir in"+elispThemeDir, ) os.Exit(1) } @@ -319,11 +321,12 @@ func main() { } files := map[string]string{ - home + "/.emacs": initLisp, - home + "/.custom.el": customLisp, - home + "/.bash_aliases": bashAliases, + home + "/.emacs": initLisp, + home + "/.custom.el": customLisp, + home + "/.bash_aliases": bashAliases, elispThemeDir + "/epaper-theme.el": elispEpaperTheme, - home + "/.gitconfig": gitConfig, + home + "/.gitconfig": gitConfig, + home + "/.gitignore": gitIgnore, } for file, contents := range files {