summaryrefslogtreecommitdiff
path: root/mix.sh
diff options
context:
space:
mode:
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