1
0
Fork 0

Add shared bin

This commit is contained in:
Jeremy Kaplan 2017-12-04 22:12:32 -08:00
commit 7436e52200
9 changed files with 58 additions and 0 deletions

10
bin/default-open Executable file
View 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