diff options
author | Thomas Boerger <thomas@webhippie.de> | 2017-03-15 16:11:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-15 16:11:26 +0100 |
commit | 780cb692d64edfadea6f79fbbad2ef033cdbe796 (patch) | |
tree | 1b0f574eb62432cbbb45358994e842f8efdba38a /scripts/generate-gitignores.go | |
parent | 42032fdecf81c25cb4aa477ddf9a0207e85f571a (diff) | |
download | gitea-780cb692d64edfadea6f79fbbad2ef033cdbe796.tar.gz gitea-780cb692d64edfadea6f79fbbad2ef033cdbe796.zip |
Make sure both scripts/ can live side by side (#1264)
Diffstat (limited to 'scripts/generate-gitignores.go')
-rw-r--r-- | scripts/generate-gitignores.go | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/scripts/generate-gitignores.go b/scripts/generate-gitignores.go index 471152c907..a169fc0242 100644 --- a/scripts/generate-gitignores.go +++ b/scripts/generate-gitignores.go @@ -1,4 +1,4 @@ -// +build !build +// +build ignore package main @@ -17,17 +17,14 @@ import ( "strings" ) -var ( - prefix = "gitea-gitignore" - url = "https://api.github.com/repos/github/gitignore/tarball" - destination = "" -) +func main() { + var ( + prefix = "gitea-gitignore" + url = "https://api.github.com/repos/github/gitignore/tarball" + destination = "" + ) -func init() { flag.StringVar(&destination, "dest", "options/gitignore/", "destination for the gitignores") -} - -func main() { flag.Parse() file, err := ioutil.TempFile(os.TempDir(), prefix) |