forgot some legacy cleanup
This commit is contained in:
		
							parent
							
								
									459f0b41f7
								
							
						
					
					
						commit
						16595fcd89
					
				
					 1 changed files with 23 additions and 3 deletions
				
			
		
							
								
								
									
										24
									
								
								sheclang
									
										
									
									
									
								
							
							
						
						
									
										24
									
								
								sheclang
									
										
									
									
									
								
							| 
						 | 
					@ -17,7 +17,11 @@
 | 
				
			||||||
#	Public Domain (y'all really care?)
 | 
					#	Public Domain (y'all really care?)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
set -e
 | 
					set -e
 | 
				
			||||||
export IFS=$'\n'
 | 
					#O_IFS=${IFS}
 | 
				
			||||||
 | 
					#export IFS=$'\n'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					COMPILER="clang++"
 | 
				
			||||||
 | 
					BUILD_FLAGS=()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Phase 1: Input Collection & Argument Checking
 | 
					## Phase 1: Input Collection & Argument Checking
 | 
				
			||||||
if [[ $# -lt 1 ]]; then
 | 
					if [[ $# -lt 1 ]]; then
 | 
				
			||||||
| 
						 | 
					@ -25,6 +29,21 @@ if [[ $# -lt 1 ]]; then
 | 
				
			||||||
	exit
 | 
						exit
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Load a global configuartion for a user
 | 
				
			||||||
 | 
					if [[ -e $HOME/.config/sheclang/config ]]; then
 | 
				
			||||||
 | 
						source $HOME/.config/sheclang/config
 | 
				
			||||||
 | 
					elif [[ -e $HOME/.sheclang ]]; then
 | 
				
			||||||
 | 
						source $HOME/.sheclang
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Load a project specific config
 | 
				
			||||||
 | 
					if [[ -e $PWD/sheclang.conf ]]; then
 | 
				
			||||||
 | 
						source $PWD/sheclang.conf
 | 
				
			||||||
 | 
					elif [[ -e $PWD/.sheclang ]]; then
 | 
				
			||||||
 | 
						source $PWD/.sheclang
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					#echo ${BUILD_FLAGS[@]}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
file_input="$1"
 | 
					file_input="$1"
 | 
				
			||||||
target_dir="$(dirname "${file_input}")"
 | 
					target_dir="$(dirname "${file_input}")"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -55,7 +74,8 @@ file_output="${target_dir}/${file_output}"
 | 
				
			||||||
shift # remove the source file from the BASH argument tree.
 | 
					shift # remove the source file from the BASH argument tree.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Runn my prefered build script. Customize to your tastes
 | 
					# Runn my prefered build script. Customize to your tastes
 | 
				
			||||||
clang++ -o "$file_output" "$file_input_corrected"
 | 
					#$COMPILER ${BUILD_FLAGS[@]} -o "$file_output" "$file_input_corrected"
 | 
				
			||||||
 | 
					$COMPILER -o "$file_output" "$file_input_corrected" ${BUILD_FLAGS[@]}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# And execute with the remaining arguments
 | 
					# And execute with the remaining arguments
 | 
				
			||||||
"$file_output" $*
 | 
					"$file_output" $*
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue