Add shared bin
This commit is contained in:
parent
a94b794c76
commit
7436e52200
9 changed files with 58 additions and 0 deletions
10
bin/default-open
Executable file
10
bin/default-open
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
mimetype=$1
|
||||
original=$2
|
||||
ext=$(grep "$mimetype" /etc/mime.types | awk '{print $2}')
|
||||
|
||||
destination=$(mktemp --suffix=".$ext")
|
||||
cp $original $destination
|
||||
xdg-open $destination &> /dev/null
|
||||
cat $destination
|
||||
Loading…
Add table
Add a link
Reference in a new issue