summaryrefslogtreecommitdiff
path: root/.local/bin/dbshare
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/dbshare')
-rwxr-xr-x.local/bin/dbshare14
1 files changed, 14 insertions, 0 deletions
diff --git a/.local/bin/dbshare b/.local/bin/dbshare
new file mode 100755
index 0000000..817fe8c
--- /dev/null
+++ b/.local/bin/dbshare
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+output="$(dropbox-cli sharelink $1)"
+
+case "$output" in
+ https*)
+ echo "$output" | xsel -b
+ notify-send -a " Dropbox" "Your file $1 can now be shared. It's url is:
+$output
+It has been copied to your clipboard." ;;
+ *)
+ notify-send -a " Dropbox" "ERROR:
+Your file could not be shared." ;;
+esac