gnupg: Bump revision after x86 text relocation fix
[termux-packages] / packages / termux-api / termux-clipboard-set
... / ...
CommitLineData
1#!/bin/sh
2set -e -u
3
4SCRIPTNAME=termux-clipboard-set
5show_usage () {
6 echo "Usage: $SCRIPTNAME <text>"
7 echo "Set the system clipboard text."
8 echo ""
9 echo "If no arguments are given the text to set is read from stdin,"
10 echo "otherwise all arguments given are used as the text to set."
11 exit 0
12}
13
14while getopts :h option
15do
16 case "$option" in
17 h) show_usage;;
18 ?) echo "$SCRIPTNAME: illegal option -$OPTARG"; exit 1;
19 esac
20done
21shift $(($OPTIND-1))
22
23CMD="@TERMUX_API@ Clipboard -e api_version 2 --ez set true"
24if [ $# = 0 ]; then
25 $CMD
26else
27 echo $@ | $CMD
28fi
29