Skip to content

Commit 8d7f7bc

Browse files
committed
Restore tabs
1 parent 55df207 commit 8d7f7bc

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

scripts/termux-sensor

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ get_delay () {
5959
}
6060

6161
call_api () {
62-
/data/data/com.termux/files/usr/libexec/termux-api Sensor "$@"
62+
/data/data/com.termux/files/usr/libexec/termux-api Sensor "$@"
6363
}
6464

6565
set_flag () {
@@ -76,28 +76,28 @@ usage_error () {
7676
PARAMS=()
7777
while getopts :h,a,c,l,s:d: option
7878
do
79-
case "$option" in
80-
h) show_usage ;;
81-
a) set_flag $ALL_SENSORS_FLAG; PARAMS+=('-a' 'sensors' '--ez' 'all' 'true');;
82-
c) set_flag $CLEANUP_FLAG; PARAMS=('-a' 'cleanup') ;;
83-
l) set_flag $LIST_FLAG; PARAMS=('-a' 'list') ;;
84-
s) set_flag $SENSOR_FLAG; get_sensors "$OPTARG"; PARAMS+=('-a' 'sensors' '--es' 'sensors' "$OPTARG") ;;
85-
d) set_flag $DELAY_FLAG; get_delay $OPTARG; PARAMS+=('--ei' 'delay' $OPTARG) ;;
86-
?) echo "$SCRIPTNAME: illegal option -$OPTARG"; exit 1;
87-
esac
79+
case "$option" in
80+
h) show_usage ;;
81+
a) set_flag $ALL_SENSORS_FLAG; PARAMS+=('-a' 'sensors' '--ez' 'all' 'true');;
82+
c) set_flag $CLEANUP_FLAG; PARAMS=('-a' 'cleanup') ;;
83+
l) set_flag $LIST_FLAG; PARAMS=('-a' 'list') ;;
84+
s) set_flag $SENSOR_FLAG; get_sensors "$OPTARG"; PARAMS+=('-a' 'sensors' '--es' 'sensors' "$OPTARG") ;;
85+
d) set_flag $DELAY_FLAG; get_delay $OPTARG; PARAMS+=('--ei' 'delay' $OPTARG) ;;
86+
?) echo "$SCRIPTNAME: illegal option -$OPTARG"; exit 1;
87+
esac
8888
done
8989
shift $((OPTIND -1))
9090

9191
# Validate options were set properly
9292

9393
if [ $((FLAGS & CLEANUP_FLAG)) -ne 0 ] && [ $FLAGS -ne $CLEANUP_FLAG ]; then
94-
usage_error "No other options should be specified with -c cleanup!"
94+
usage_error "No other options should be specified with -c cleanup!"
9595
elif [ $((FLAGS & LIST_FLAG)) -ne 0 ] && [ $FLAGS -ne $LIST_FLAG ]; then
96-
usage_error "No other options should be specified with -l list!"
96+
usage_error "No other options should be specified with -l list!"
9797
elif [ $((FLAGS & DELAY_FLAG)) -ne 0 ] && [ $((FLAGS & (ALL_SENSORS_FLAG | SENSOR_FLAG))) -eq 0 ]; then
98-
usage_error "Use -s <sensors> or -a option when using -d delay!"
98+
usage_error "Use -s <sensors> or -a option when using -d delay!"
9999
elif [ $((FLAGS & ALL_SENSORS_FLAG)) -ne 0 ] && [ $((FLAGS & SENSOR_FLAG)) -ne 0 ]; then
100-
usage_error "Listed sensors will be ignored with -a all option!"
100+
usage_error "Listed sensors will be ignored with -a all option!"
101101
fi
102102

103103
call_api "${PARAMS[@]}"

0 commit comments

Comments
 (0)