From ae4693676e49907442d53d320a7c758557c9770a Mon Sep 17 00:00:00 2001 From: dweller Date: Wed, 16 Aug 2023 15:35:25 +0300 Subject: Initial commit --- xpaste | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 xpaste (limited to 'xpaste') diff --git a/xpaste b/xpaste new file mode 100755 index 0000000..444206f --- /dev/null +++ b/xpaste @@ -0,0 +1,17 @@ +#!/bin/sh +# +# Copyright (C) 2023 dwlr +# +# BSD 3-Clause License (BSD-3-Clause) +# See LICENSE for details + +set -e + + +echo "$(xclip -sel clipboard -o -r -t text/uri-list | cut -d':' -f2- | tr -d '\r')" \ +| while IFS= read -r path +do + if [ -e "${path}" ]; then + cp -v -r "${path}" "$(basename ${path})" + fi +done -- cgit v1.2.3