Created
March 11, 2015 20:12
-
-
Save thomasdegry/b9545450172ad0cacecb to your computer and use it in GitHub Desktop.
Go code wait
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func takePhoto() { | |
takePhotoCommand := exec.Command("./photo.sh") | |
result, err := takePhotoCommand.Output() | |
fmt.Println(string(result)) | |
if err != nil { | |
panic(err) | |
} else { | |
fmt.Println("Phto was taken") | |
resetExifCommand := exec.Command("./reset-exif.sh") | |
resultRotation, errRotation := resetExifCommand.Output() | |
fmt.Println(string(resultRotation)) | |
if errRotation != nil { | |
check(errRotation) | |
} else { | |
fmt.Println("Will upload photo") | |
uploadFileToTablet("photo.jpg") | |
fmt.Println("Did upload photo to tablet") | |
time.Sleep(10 * time.Second) | |
uploadFileToTablet("done.txt") | |
fmt.Println("Did upload done.txt to tablet") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment