2014-03-22 00:30:15 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"os"
|
2014-03-22 01:18:42 +00:00
|
|
|
"github.com/dotcloud/docker/pkg/dockerscript"
|
2014-03-22 00:30:15 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2014-03-22 01:18:42 +00:00
|
|
|
script, err := dockerscript.Parse(os.Stdin)
|
2014-03-22 00:30:15 +00:00
|
|
|
if err != nil {
|
2014-03-22 01:18:42 +00:00
|
|
|
fmt.Fprintf(os.Stderr, "parse error: %v\n", err)
|
2014-03-22 00:30:15 +00:00
|
|
|
os.Exit(1)
|
|
|
|
}
|
2014-03-22 01:18:42 +00:00
|
|
|
fmt.Printf("%d commands:\n", len(script))
|
|
|
|
for i, cmd := range script {
|
2014-03-22 00:30:15 +00:00
|
|
|
fmt.Printf("%%%d: %s\n", i, cmd)
|
|
|
|
}
|
|
|
|
}
|