1 #!/data/data/com.termux/files/usr/bin/sh
4 if [ "$#" != "0" ]; then
5 echo 'usage: termux-info'
6 echo 'Provides information about Termux, and the current system. Helpful for debugging.'
11 apt update >/dev/null 2>&1
12 updatable=$(apt list --upgradable 2>/dev/null | tail -n +2)
13 if [ -z "$updatable" ];then
14 echo "All packages up to date"
20 output="Updatable packages:
25 $(dpkg --print-architecture)
27 $(getprop ro.build.version.release)
29 $(getprop ro.product.manufacturer)
31 $(getprop ro.product.model)"
33 # Copy to clipboard (requires termux-api)
34 # use timeout in case termux-api is installed but the termux:api app is missing
35 echo "$output" | busybox timeout -t 3 termux-clipboard-set 2>/dev/null
36 busybox timeout -t 3 termux-toast "Information has been copied to the clipboard" 2>/dev/null