| 
									
										
										
										
											2023-02-23 18:48:37 -06:00
										 |  |  | #!/bin/bash | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # . CONFIG.sh | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # set -o xtrace       ## To debug scripts | 
					
						
							|  |  |  | # set -o errexit      ## To exit on error | 
					
						
							|  |  |  | # set -o errunset     ## To exit if a variable is referenced but not set | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | function main() { | 
					
						
							|  |  |  |     call_path=`pwd` | 
					
						
							|  |  |  |     path="" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-27 22:57:28 -05:00
										 |  |  |     # NOTE: Remove if you want to pass file(s) besides directories... | 
					
						
							| 
									
										
										
										
											2023-02-23 18:48:37 -06:00
										 |  |  |     if [[ ! "${1::1}" == /* ]]; then | 
					
						
							|  |  |  |         path="${call_path}/${1}" | 
					
						
							|  |  |  |     else | 
					
						
							|  |  |  |         path="${1}" | 
					
						
							|  |  |  |     fi | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     if [ ! -d "${path}" ]; then | 
					
						
							|  |  |  |         echo "<change_me>: Path given not a directory..." | 
					
						
							|  |  |  |         exit 1 | 
					
						
							|  |  |  |     fi | 
					
						
							| 
									
										
										
										
											2023-10-27 22:57:28 -05:00
										 |  |  |     # End NOTE: Remove if you want to pass file(s) besides directories...     | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     # Collect abs paths and stuff in 'files' array | 
					
						
							|  |  |  |     mapfile -t files < <(readlink -f "$@") | 
					
						
							| 
									
										
										
										
											2023-02-23 18:48:37 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  |     cd "/opt/" | 
					
						
							|  |  |  |     python /opt/<change_me>.zip "$@" | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2023-10-27 22:57:28 -05:00
										 |  |  | main "$@"; |