set -e doesn't like [ blah ] && blah syntax
changed to if [ blah ]; then blah; fi format migrated echo usage to cat with HEREDOC to improve readability
This commit is contained in:
		
					parent
					
						
							
								a1793f66ff
							
						
					
				
			
			
				commit
				
					
						d77c67b56f
					
				
			
		
					 1 changed files with 8 additions and 2 deletions
				
			
		| 
						 | 
					@ -36,6 +36,12 @@ fi
 | 
				
			||||||
rcvar=$(cat "$__object/explorer/rcvar")
 | 
					rcvar=$(cat "$__object/explorer/rcvar")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# --state absent, so ensure that .new doesn't exist and that conf is renamed to .old
 | 
					# --state absent, so ensure that .new doesn't exist and that conf is renamed to .old
 | 
				
			||||||
echo "[ -f \"${rcvar}.new\" ] && rm \"${rcvar}.new\""
 | 
					cat <<EOF
 | 
				
			||||||
echo "[ -f \"${rcvar}\" ] && mv \"${rcvar}\" \"${rcvar}.old\""
 | 
					if [ -f "${rcvar}.new" ]; then
 | 
				
			||||||
 | 
					   rm "${rcvar}.new"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					if [ -f "${rcvar}" ]; then
 | 
				
			||||||
 | 
					   mv "${rcvar}" "${rcvar}.old"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue