| 
									
										
										
										
											2015-07-31 00:34:53 +00:00
										 |  |  | # | 
					
						
							|  |  |  | # power/ptest | 
					
						
							|  |  |  | # | 
					
						
							| 
									
										
										
										
											2015-02-27 00:58:55 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-31 00:34:53 +00:00
										 |  |  | local state="$(echo /sys/class/power_supply/A*)" | 
					
						
							| 
									
										
										
										
											2015-02-27 00:58:55 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-31 00:34:53 +00:00
										 |  |  | if test -n "$state" -a -r "$state"; then | 
					
						
							|  |  |  | 	state=$(< "$state") | 
					
						
							|  |  |  | 	case "$state" in | 
					
						
							|  |  |  | 		(1) echo "adp";; | 
					
						
							|  |  |  | 		(0) echo "bat";; | 
					
						
							| 
									
										
										
										
											2015-02-27 00:58:55 +00:00
										 |  |  | 	esac | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-31 00:34:53 +00:00
										 |  |  | # | 
					
						
							|  |  |  | # vim:fenc=utf-8:ft=sh:ci:pi:sts=0:sw=4:ts=4: | 
					
						
							|  |  |  | # |