From 9b88e0deb77605625e2528073fde610879bb1b4c Mon Sep 17 00:00:00 2001 From: Zi1mo5zo Date: Thu, 22 Nov 2018 13:51:19 +0100 Subject: [PATCH] Remove trailing slash from the name of the file to send, if any --- ipfs-wormhole.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ipfs-wormhole.sh b/ipfs-wormhole.sh index 5130b47..1e1da5c 100755 --- a/ipfs-wormhole.sh +++ b/ipfs-wormhole.sh @@ -24,7 +24,8 @@ send) GPGCMD="$(checkdep gpg)" IPFSCMD="$(checkdep ipfs)" PASSWORD=$($PWGENCMD -1 20) - FILE=${2:-} + USERINPUT=${2:-} + FILE=${USERINPUT%/} if ! pgrep ipfs 1>/dev/null 2>&1; then echo "IPFS is not running, starting the daemon and sleep 5 seconds" $IPFSCMD daemon &