summaryrefslogtreecommitdiffstats
path: root/scripts/generate-gitignores.go
diff options
context:
space:
mode:
authorThomas Boerger <thomas@webhippie.de>2017-03-15 16:11:26 +0100
committerGitHub <noreply@github.com>2017-03-15 16:11:26 +0100
commit780cb692d64edfadea6f79fbbad2ef033cdbe796 (patch)
tree1b0f574eb62432cbbb45358994e842f8efdba38a /scripts/generate-gitignores.go
parent42032fdecf81c25cb4aa477ddf9a0207e85f571a (diff)
downloadgitea-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.go17
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)