20 lines
425 B
Bash
20 lines
425 B
Bash
|
|
#!/usr/bin/env bash
|
||
|
|
|
||
|
|
# klevstul :: 24.06
|
||
|
|
|
||
|
|
this_file_name=`basename "$0"`
|
||
|
|
#if [ $# -lt 2 ]; then
|
||
|
|
# echo "error: paths to file and directory are missing."
|
||
|
|
# echo "usage: '$this_file_name [path_to_file] [path_to_dir]'"
|
||
|
|
# exit 1
|
||
|
|
#fi
|
||
|
|
|
||
|
|
cwd=$(pwd)
|
||
|
|
|
||
|
|
input_file=$(dragon-drop --target --and-exit)
|
||
|
|
input_file=${input_file:7} # remove "file://" from file path
|
||
|
|
|
||
|
|
if [[ -f "${input_file}" ]] ; then
|
||
|
|
cp ${input_file} ${cwd}
|
||
|
|
fi
|