More fixes on lip
This commit is contained in:
		
							parent
							
								
									d1ae06e7ef
								
							
						
					
					
						commit
						910e7fae63
					
				
					 1 changed files with 4 additions and 3 deletions
				
			
		|  | @ -6,14 +6,15 @@ url="https://ip.frogeye.fr/json" | ||||||
| cachedir="$HOME/.cache/lip" | cachedir="$HOME/.cache/lip" | ||||||
| 
 | 
 | ||||||
| ip="${1:-}" | ip="${1:-}" | ||||||
| if [ $# -gt 0 ] | jq_sel="del(.user_agent)" | ||||||
|  | 
 | ||||||
|  | if [ $# -gt 1 ] | ||||||
| then | then | ||||||
|     shift |     shift | ||||||
|     jq_sel="$@" |     jq_sel="$@" | ||||||
| else |  | ||||||
|     jq_sel="del(.user_agent)" |  | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
| if [ -n "$ip" ] | if [ -n "$ip" ] | ||||||
| then | then | ||||||
|     cachefile="$cachedir/$ip" |     cachefile="$cachedir/$ip" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue