this is insane

This commit is contained in:
maddalax 2024-09-13 15:02:11 -05:00
parent b0ff36d34e
commit bae2641808
3 changed files with 7 additions and 2 deletions

View file

@ -12,7 +12,7 @@ import (
var taskFile string var taskFile string
func main() { func main() {
taskFlag := flag.String("task", "", "Specify the task to run (e.g., build, clean, deploy)") taskFlag := flag.String("task", "", "Specify the task to run (e.g., build, setup). Type -task list to see the list of tasks to run.")
// Parse the command-line flags // Parse the command-line flags
flag.Parse() flag.Parse()
@ -31,6 +31,10 @@ func main() {
return return
} }
if *taskFlag == "list" {
*taskFlag = "--list"
}
// Define the command and arguments // Define the command and arguments
cmd := exec.Command("task", "-t", temp.Name(), *taskFlag) cmd := exec.Command("task", "-t", temp.Name(), *taskFlag)
// Set the standard output and error to be the same as the Go program // Set the standard output and error to be the same as the Go program
@ -42,5 +46,4 @@ func main() {
fmt.Printf("Error running task command: %v\n", err) fmt.Printf("Error running task command: %v\n", err)
return return
} }
fmt.Println("Task executed successfully!")
} }

2
setup.md Normal file
View file

@ -0,0 +1,2 @@
go install github.com/maddalax/mhtml/framework/tooling/mhtml