1 // Copyright 2019 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
6 // `go run update_readme.go.` at //third_party/libgav1.
7 // README.chromium is updated with the correct info.
16 gitCmd := exec.Command("bash", "-c", "git --no-pager log -1 --format=format:\"%H\"")
18 out, err := gitCmd.Output()
20 panic(fmt.Sprintf("failed to execute git command: %v", err))
25 sedCmd := exec.Command("sed", "-E", "-i.back", "-e",
26 fmt.Sprintf("s/^(Revision:)[[:space:]]+[a-f0-9]{40}/\\1 %s/", hash),
28 if err := sedCmd.Run(); err != nil {
29 panic(fmt.Sprintf("failed to execute sed command: %v %v", sedCmd, err))
32 rmCmd := exec.Command("rm", "README.chromium.back")
33 if rmCmd.Run() != nil {
34 panic(fmt.Sprintf("failed to execute rm command: %v", err))