mirror of
https://github.com/danog/termux-api-package.git
synced 2024-11-30 04:39:01 +01:00
commit
7f47901d5b
32
scripts/termux-call-log
Executable file
32
scripts/termux-call-log
Executable file
@ -0,0 +1,32 @@
|
|||||||
|
#!/data/data/com.termux/files/usr/bin/bash
|
||||||
|
set -u
|
||||||
|
|
||||||
|
PARAM_LIMIT=10
|
||||||
|
PARAM_OFFSET=0
|
||||||
|
PARAMS=""
|
||||||
|
|
||||||
|
SCRIPTNAME=termux-call-log
|
||||||
|
|
||||||
|
show_usage () {
|
||||||
|
echo "Usage: $SCRIPTNAME [-d] [-l limit] [-o offset]"
|
||||||
|
echo "List call log history"
|
||||||
|
echo " -l limit offset in call log list (default: $PARAM_LIMIT)"
|
||||||
|
echo " -o offset offset in call log list (default: $PARAM_OFFSET)"
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
while getopts :hl:o: option
|
||||||
|
do
|
||||||
|
case "$option" in
|
||||||
|
h) show_usage;;
|
||||||
|
l) PARAM_LIMIT=$OPTARG;;
|
||||||
|
o) PARAM_OFFSET=$OPTARG;;
|
||||||
|
?) echo "$SCRIPTNAME: illegal option -$OPTARG"; exit 1;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift $(($OPTIND-1))
|
||||||
|
|
||||||
|
if [ $# != 0 ]; then echo "$SCRIPTNAME: too many arguments"; exit 1; fi
|
||||||
|
|
||||||
|
PARAMS="$PARAMS --ei offset $PARAM_OFFSET --ei limit $PARAM_LIMIT"
|
||||||
|
/data/data/com.termux/files/usr/libexec/termux-api CallLog $PARAMS
|
Loading…
Reference in New Issue
Block a user