termux-open: Handle relative paths

This commit is contained in:
Fredrik Fornwall 2017-02-28 00:29:49 +01:00
parent 12d3fff047
commit 83686ac5af

View File

@ -35,10 +35,15 @@ if [ $# != 1 ]; then
show_usage
fi
FILE="$1"
if [ -f "$FILE" ]; then
FILE=`realpath "$FILE"`
fi
am broadcast --user 0 \
-a $ACTION \
-n com.termux/com.termux.app.TermuxOpenReceiver \
$EXTRAS \
-d "$1" \
-d "$FILE" \
> /dev/null