diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-05 19:44:51 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-05 19:44:51 +0200 |
| commit | f209398d93689cf29b0695b615478d63fee3eb37 (patch) | |
| tree | 51196e2dc01af921c9f7245da8ca23a9d0029d5b /mix.sh | |
| parent | cd6fe54ec05b37335838be0c7bde638c4ffbe156 (diff) | |
push to the new endpoint now
Diffstat (limited to 'mix.sh')
| -rwxr-xr-x | mix.sh | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -1,12 +1,13 @@ #!/bin/bash if [ "$#" -ne 2 ]; then - echo "Usage: $0 <results/exp\:experiment> render_name" + echo "Usage: $0 <results/exp\:experiment> render_name endpoint" exit fi dir=$1 name=$2 +endpoint=$3 now=`date +'%Y%m%d'` echo "rendering $name" @@ -21,5 +22,16 @@ cd .. grep valid log cd ../.. -node upload.js "./output/$name.mp3" - +if [ -z "$endpoint" ]; then + echo "no endpoint specified, upload to bucky"; + node upload.js "./output/$name.mp3" +else + echo "upload to $endpoint" + curl \ + -X PUT \ + -F "module=samplernn" \ + -F "activity=train" \ + -F "generated=true" \ + -F "file=@./output/$name.mp3" \ + $endpoint +fi |
