colordiff: Update from 1.0.16 to 1.0.18
[termux-packages] / packages / termux-tools / termux-open
index aaa7bd0..0afe2d5 100755 (executable)
@@ -15,7 +15,7 @@ show_usage () {
 TEMP=`busybox getopt \
      -n $SCRIPTNAME \
      -o h \
-     --long send,view,chooser,content-type:,\
+     --long send,view,chooser,content-type:,help\
      -- "$@"`
 eval set -- "$TEMP"
 
@@ -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