made dmenu_path the way anydot proposed in response to Jukka
This commit is contained in:
		
							
								
								
									
										23
									
								
								dmenu_path
									
									
									
									
									
								
							
							
						
						
									
										23
									
								
								dmenu_path
									
									
									
									
									
								
							@@ -1,22 +1,15 @@
 | 
				
			|||||||
#!/bin/sh
 | 
					#!/bin/sh
 | 
				
			||||||
CACHE=$HOME/.dmenu_cache
 | 
					CACHE=$HOME/.dmenu_cache
 | 
				
			||||||
UPTODATE=1
 | 
					 | 
				
			||||||
IFS=:
 | 
					IFS=:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
uptodate() { [ $UPTODATE -eq 1 ]; }
 | 
					uptodate() {                                                                       
 | 
				
			||||||
 | 
						test ! -f $CACHE && return 1                                                   
 | 
				
			||||||
if test ! -f $CACHE 
 | 
						for dir in $PATH                                                                
 | 
				
			||||||
then
 | 
						do                                                                              
 | 
				
			||||||
	UPTODATE=0
 | 
							test $dir -nt $CACHE && return 1                                           
 | 
				
			||||||
fi
 | 
						done                                                                            
 | 
				
			||||||
 | 
						return 0                                                                       
 | 
				
			||||||
if uptodate
 | 
					}          
 | 
				
			||||||
then
 | 
					 | 
				
			||||||
	for dir in $PATH
 | 
					 | 
				
			||||||
	do
 | 
					 | 
				
			||||||
		test $dir -nt $CACHE && { UPTODATE=0; break; }
 | 
					 | 
				
			||||||
	done
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
if ! uptodate
 | 
					if ! uptodate
 | 
				
			||||||
then
 | 
					then
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user