File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,20 +7,24 @@ show_usage () {
77 echo " Download a resource using the system download manager."
88 echo " -d description description for the download request notification"
99 echo " -t title title for the download request notification"
10+ echo " -p path full path to which the file should be downloaded"
1011 exit 0
1112}
1213
1314ARG_D=" "
1415OPT_D=" "
1516ARG_T=" "
1617OPT_T=" "
18+ ARG_P=" "
19+ OPT_P=" "
1720
18- while getopts :hd:t: option
21+ while getopts :hd:t:p: option
1922do
2023 case " $option " in
2124 h) show_usage;;
2225 d) ARG_D=" --es description" ; OPT_D=" $OPTARG " ;;
2326 t) ARG_T=" --es title" ; OPT_T=" $OPTARG " ;;
27+ p) ARG_P=" --es path" ; OPT_P=" $OPTARG " ;;
2428 ? ) echo " $SCRIPTNAME : illegal option -$OPTARG " ; exit 1;
2529 esac
2630done
@@ -34,6 +38,7 @@ URL_TO_DOWNLOAD="$1"
3438set --
3539if [ -n " $ARG_D " ]; then set -- " $@ " $ARG_D " $OPT_D " ; fi
3640if [ -n " $ARG_T " ]; then set -- " $@ " $ARG_T " $OPT_T " ; fi
41+ if [ -n " $ARG_P " ]; then set -- " $@ " $ARG_P " $OPT_P " ; fi
3742set -- " $@ " " $URL_TO_DOWNLOAD "
3843
3944/data/data/com.termux/files/usr/libexec/termux-api Download " $@ "
You can’t perform that action at this time.
0 commit comments