| 
									
										
										
										
											2024-07-08 13:45:57 +08:00
										 |  |  | #!/usr/bin/env bash
 | 
					
						
							| 
									
										
										
										
											2023-07-03 04:07:11 -10:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-08-13 16:13:33 +08:00
										 |  |  | args=("$@") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # check the cost time | 
					
						
							|  |  |  | start_time=$(date +%s) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # read the arguments to skip the pub get and package get | 
					
						
							|  |  |  | skip_pub_get=false | 
					
						
							|  |  |  | skip_pub_packages_get=false | 
					
						
							|  |  |  | verbose=false | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Parse command line arguments | 
					
						
							|  |  |  | while [[ $# -gt 0 ]]; do | 
					
						
							|  |  |  |     case "$1" in | 
					
						
							|  |  |  |     --skip-pub-get) | 
					
						
							|  |  |  |         skip_pub_get=true | 
					
						
							|  |  |  |         shift | 
					
						
							|  |  |  |         ;; | 
					
						
							|  |  |  |     --skip-pub-packages-get) | 
					
						
							|  |  |  |         skip_pub_packages_get=true | 
					
						
							|  |  |  |         shift | 
					
						
							|  |  |  |         ;; | 
					
						
							|  |  |  |     --verbose) | 
					
						
							|  |  |  |         verbose=true | 
					
						
							|  |  |  |         shift | 
					
						
							|  |  |  |         ;; | 
					
						
							|  |  |  |     --exclude-packages) | 
					
						
							|  |  |  |         shift | 
					
						
							|  |  |  |         ;; | 
					
						
							|  |  |  |     *) | 
					
						
							|  |  |  |         echo "Unknown option: $1" | 
					
						
							|  |  |  |         exit 1 | 
					
						
							|  |  |  |         ;; | 
					
						
							|  |  |  |     esac | 
					
						
							|  |  |  | done | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-03 04:07:11 -10:00
										 |  |  | # Store the current working directory | 
					
						
							|  |  |  | original_dir=$(pwd) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Change the current working directory to the script's location | 
					
						
							|  |  |  | cd "$(dirname "$0")" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Call the script in the 'language_files' folder | 
					
						
							|  |  |  | cd language_files | 
					
						
							|  |  |  | # Allow execution permissions on CI | 
					
						
							|  |  |  | chmod +x ./generate_language_files.sh | 
					
						
							| 
									
										
										
										
											2024-08-13 16:13:33 +08:00
										 |  |  | # Pass the arguments to the script | 
					
						
							|  |  |  | ./generate_language_files.sh "${args[@]}" | 
					
						
							| 
									
										
										
										
											2023-07-03 04:07:11 -10:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Return to the main script directory | 
					
						
							|  |  |  | cd .. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-08-13 16:13:33 +08:00
										 |  |  | # Call the script in the 'flowy_icons' folder | 
					
						
							|  |  |  | cd flowy_icons | 
					
						
							| 
									
										
										
										
											2023-07-03 04:07:11 -10:00
										 |  |  | # Allow execution permissions on CI | 
					
						
							| 
									
										
										
										
											2024-08-13 16:13:33 +08:00
										 |  |  | chmod +x ./generate_flowy_icons.sh | 
					
						
							|  |  |  | ./generate_flowy_icons.sh "${args[@]}" | 
					
						
							| 
									
										
										
										
											2023-08-14 13:34:01 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Return to the main script directory | 
					
						
							| 
									
										
										
										
											2023-08-03 19:02:44 +07:00
										 |  |  | cd .. | 
					
						
							| 
									
										
										
										
											2023-08-03 08:48:04 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-08-13 16:13:33 +08:00
										 |  |  | # Call the script in the 'freezed' folder | 
					
						
							|  |  |  | cd freezed | 
					
						
							| 
									
										
										
										
											2023-08-14 13:34:01 -07:00
										 |  |  | # Allow execution permissions on CI | 
					
						
							| 
									
										
										
										
											2024-08-13 16:13:33 +08:00
										 |  |  | chmod +x ./generate_freezed.sh | 
					
						
							| 
									
										
										
										
											2024-08-19 11:06:34 +08:00
										 |  |  | ./generate_freezed.sh "${args[@]}" --show-loading | 
					
						
							| 
									
										
										
										
											2023-08-14 13:34:01 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-03 04:07:11 -10:00
										 |  |  | # Return to the original directory | 
					
						
							|  |  |  | cd "$original_dir" | 
					
						
							| 
									
										
										
										
											2024-08-13 16:13:33 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | # echo the cost time | 
					
						
							|  |  |  | end_time=$(date +%s) | 
					
						
							|  |  |  | cost_time=$((end_time - start_time)) | 
					
						
							|  |  |  | echo "✅ Code generation cost $cost_time seconds." |