diff options
author | dweller <dweller@cabin.digital> | 2023-08-16 15:35:25 +0300 |
---|---|---|
committer | dweller <dweller@cabin.digital> | 2023-08-16 15:35:25 +0300 |
commit | ae4693676e49907442d53d320a7c758557c9770a (patch) | |
tree | eec7660ab62dff7cb548dad090b21b13ef8aec56 /xpaste |
Initial commit
Diffstat (limited to 'xpaste')
-rwxr-xr-x | xpaste | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -0,0 +1,17 @@ +#!/bin/sh +# +# Copyright (C) 2023 dwlr <dweller@cabin.digital> +# +# 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 |