#!/bin/sh -eu

path="$(realpath "$1")"

if ! [ -e "$path" ]; then
  echo >&2 "No such file or directory"
  exit 1
fi

exec wl-copy -t "text/uri-list" "file://$path"
