package main import ( "fmt" "os" "os/exec" ) // Hello, fellow programmer! This is a warning script. // It is meant for idiots who don't read the README.md file. // If you are reading this, you are probably one of those idiots. // Please use the Makefile to build burgerbackup. // If you are trying to contribute to burgerbackup, then start by reading the README.md file. // That might have a teensy weensy bit of useful information. // ;) Have a great day (unless you are using this script in production). func main() { fmt.Println("[WARN] This isn't how you are meant to build burgerbackup. Please use the Makefile.") fmt.Println("[INFO] This script only exists as a warning and so go test has something to run.") fmt.Print("[PROMPT] Would you like me to run the makefile for you? (y/n): ") var input string _, err := fmt.Scanln(&input) if err != nil { fmt.Println("[FATAL] Error reading input: " + err.Error()) os.Exit(1) } if input == "y" { fmt.Println("[INFO] Running make... (you should use the Makefile, this isn't how you are meant to build burgerbackup)") err := exec.Command("make").Run() if err != nil { fmt.Println("[FATAL] Error running make: " + err.Error()) os.Exit(1) } else { fmt.Println("[INFO] Shame on you for not using the Makefile.") fmt.Println("[INFO] If you use this idiotic script in production, I will find you. I will capture you. And I will make you use the Makefile.") } } else { fmt.Println("[INFO] Shame on you for not using the Makefile.") fmt.Println("[INFO] If you use this idiotic script in production, I will find you. I will capture you. And I will make you use the Makefile.") os.Exit(1) } }