php: Update from 7.1.1 to 7.1.2 and enable pcntl
[termux-packages] / packages / termux-api / termux-storage-get
CommitLineData
33b944c8
FF
1#!/bin/sh
2set -e -u
3
4SCRIPTNAME=termux-storage-get
5show_usage () {
6 echo "Usage: $SCRIPTNAME output-file"
7 echo "Request a file from the system and output it to the specified file."
8 exit 0
9}
10
11
12while getopts :h option
13do
14 case "$option" in
15 h) show_usage;;
16 ?) echo "$SCRIPTNAME: illegal option -$OPTARG"; exit 1;
17 esac
18done
19shift $(($OPTIND-1))
20
21if [ $# -gt 1 ]; then echo "$SCRIPTNAME: too many arguments"; exit 1; fi
22if [ $# -lt 1 ]; then echo "$SCRIPTNAME: no output file specified"; exit 1; fi
23
24@TERMUX_API@ StorageGet --es file "`realpath "$1"`"