mirror of
				https://github.com/ArthurSonzogni/FTXUI.git
				synced 2025-10-31 18:48:11 +08:00 
			
		
		
		
	Add automatic formatting and license.
This commit is contained in:
		
							
								
								
									
										19
									
								
								other/format.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										19
									
								
								other/format.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| #!/bin/bash | ||||
| cd "$(dirname "$0")" | ||||
| cd .. | ||||
|  | ||||
| # Add the license file. | ||||
| files=$(find ./src ./include ./examples  -name "*.hpp" -o -name "*.cpp") | ||||
| for file in $files | ||||
| do | ||||
|   if ! grep -q Copyright $file | ||||
|   then | ||||
|     cat ./other/license_headers.cpp $file >$file.new && mv $file.new $file | ||||
|   fi | ||||
| done | ||||
|  | ||||
| # Use clang-format. | ||||
| for file in $files | ||||
| do | ||||
|   clang-format -i $file | ||||
| done | ||||
							
								
								
									
										4
									
								
								other/license_headers.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								other/license_headers.cpp
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| // Copyright 2020 Arthur Sonzogni. All rights reserved. | ||||
| // Use of this source code is governed by the MIT license that can be found in | ||||
| // the LICENSE file. | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 ArthurSonzogni
					ArthurSonzogni