mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-24 00:36:17 -04:00
Enable sending multiple files via cli and add files to use this via the send-to menu on Windows and Ubuntu (using Nautilus)
This commit is contained in:
parent
62e198b5d3
commit
eeb7dca884
7 changed files with 271 additions and 84 deletions
20
pairdrop-cli/send-with-pairdrop.sh
Normal file
20
pairdrop-cli/send-with-pairdrop.sh
Normal file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
# edit this to point to the pairdrop-cli executable
|
||||
pathToPairDropCli="/usr/local/bin/pairdrop-cli/pairdrop"
|
||||
|
||||
# Initialize an array
|
||||
lines=()
|
||||
|
||||
# Read each line into the array
|
||||
while IFS= read -r line; do
|
||||
lines+=("$line")
|
||||
done <<< "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"
|
||||
|
||||
# Get the length of the array
|
||||
length=${#lines[@]}
|
||||
|
||||
# Remove the last entry
|
||||
unset 'lines[length-1]'
|
||||
|
||||
$pathToPairDropCli "${lines[@]}"
|
Loading…
Add table
Add a link
Reference in a new issue