Add script to setup supervise symlinks
This commit is contained in:
		
							parent
							
								
									2de8087c3e
								
							
						
					
					
						commit
						3a5dc24f75
					
				
					 1 changed files with 18 additions and 0 deletions
				
			
		
							
								
								
									
										18
									
								
								setup-supervise.zsh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										18
									
								
								setup-supervise.zsh
									
										
									
									
									
										Executable file
									
								
							|  | @ -0,0 +1,18 @@ | ||||||
|  | #!/bin/zsh | ||||||
|  | for i in *(/); do | ||||||
|  | 	if [[ -h ${i:a}/supervise ]]; then continue | ||||||
|  | 	elif [[ -d ${i:a}/supervise ]]; then | ||||||
|  | 		echo "Warning: ${i:a}/supervise is a directory, not a symlink" | ||||||
|  | 	else | ||||||
|  | 		echo creating ${i:a}/supervise | ||||||
|  | 		ln -s ${XDG_RUNTIME_DIR:-/run/user/$UID}/supervise.${i:t} ${i:a}/supervise  | ||||||
|  | 	fi | ||||||
|  | done | ||||||
|  | for i in */log(/); do | ||||||
|  | 	if [[ -h ${i:a}/supervise ]]; then continue | ||||||
|  | 	elif [[ -d ${i:a}/supervise ]]; then | ||||||
|  | 		echo "Warning: ${i:a}/supervise is a directory, not a symlink" | ||||||
|  | 	else | ||||||
|  | 		ln -s ${XDG_RUNTIME_DIR:-/run/user/$UID}/supervise.${i:h:t}-log ${i:a}/supervise | ||||||
|  | 	fi | ||||||
|  | done | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 crater2150
						crater2150