You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
packer/builder/amazon/chroot/copy_files.go

16 lines
301 B

package chroot
import (
"fmt"
"os/exec"
)
func copySingle(dest string, src string, copyCommand string) error {
cpCommand := fmt.Sprintf("%s %s %s", copyCommand, src, dest)
localCmd := exec.Command("/bin/sh", "-c", cpCommand)
if err := localCmd.Run(); err != nil {
return err
}
return nil
}