#!/system/bin/sh

if [ $# -eq 0 ] || [ "$@" = "-help" ]; then
  echo usage: contenturi [file]
  echo convert the passed file to a content uri
  exit 0
fi

#There is a bug with android's default netcat so use toybox's netcat.
#Android's netcat doesn't terminate when stdin closes.
echo -n contenturi $(realpath $@) | toybox nc localhost $QAMAR_PORT

