# HG changeset patch # User smith@nwoca.org # Date 1457714377 0 # Node ID f04f13a1d5d8020344cfbb1efcde054c6ee1c0a2 # Parent 4f0dd7815e04f873b03378770b4a52901b3221dc add script to send file to ssdt upload server diff -r 4f0dd7815e04 -r f04f13a1d5d8 init.sh --- a/init.sh Wed Mar 09 01:29:56 2016 +0000 +++ b/init.sh Fri Mar 11 16:39:37 2016 +0000 @@ -1,2 +1,3 @@ #!/bin/bash alias utils='docker run -it -v ${PWD}:/tmp -v /ssdt:/ssdt --rm docker.ssdt.io/ssdt-utils' +alias send2ssdt='/ssdt/scripts/send.sh' \ No newline at end of file diff -r 4f0dd7815e04 -r f04f13a1d5d8 scripts/send.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/send.sh Fri Mar 11 16:39:37 2016 +0000 @@ -0,0 +1,10 @@ +#!/bin/bash +file=${1?"Usage: $0 filename [name]\n specify the filename relative to the current directory or - for stdin.\noptionally specify a short name (default to base directory)"} +if [ "$file" != "-" ] +then + file="/tmp/${file}" +fi +name=${2:-$(basename $PWD)} +source=$(hostname) +docker run -i -v /ssdt:/ssdt -v ${PWD}:/tmp --rm docker.ssdt.io/ssdt-utils \ + curl -F source=$source -F name=$name -F file=@$file https://upload.ssdt.io/upload \ No newline at end of file