~mil/sxmo-utils

sxmo-utils/scripts/modem/sxmo_modeminfo.sh -rwxr-xr-x 322 bytes
9bd3f31bStacy Harper Cleanup sxmo_file.sh 8 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env sh

err() {
	printf %b "$1" | dmenu
	exit
}

modem_n() {
	MODEMS="$(mmcli -L)"
	echo "$MODEMS" | grep -oE 'Modem\/([0-9]+)' > /dev/null || err "Couldn't find modem - is your modem enabled?"
	echo "$MODEMS" | grep -oE 'Modem\/([0-9]+)' | cut -d'/' -f2
}

sxmo_terminal.sh sh -c "mmcli -m $(modem_n) && read"