summaryrefslogtreecommitdiff
path: root/mix.sh
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-06-05 19:44:51 +0200
committerJules Laplace <julescarbon@gmail.com>2018-06-05 19:44:51 +0200
commitf209398d93689cf29b0695b615478d63fee3eb37 (patch)
tree51196e2dc01af921c9f7245da8ca23a9d0029d5b /mix.sh
parentcd6fe54ec05b37335838be0c7bde638c4ffbe156 (diff)
push to the new endpoint now
Diffstat (limited to 'mix.sh')
-rwxr-xr-xmix.sh18
1 files changed, 15 insertions, 3 deletions
diff --git a/mix.sh b/mix.sh
index 9df81a7..bc5eff5 100755
--- a/mix.sh
+++ b/mix.sh
@@ -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