Added a function to copy files and folders into the 'output' folder
This commit is contained in:
		
							
								
								
									
										11
									
								
								build.sh
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								build.sh
									
									
									
									
									
								
							| @@ -1,7 +1,6 @@ | ||||
| #!/bin/bash | ||||
|  | ||||
| BASE_PATH="/home/aadhavan/Programming/Bash/sitegen" | ||||
|  | ||||
| BASE_PATH=$(dirname "$0") | ||||
|  | ||||
| check_for_dirs() { | ||||
| 	if [ ! -d "${BASE_PATH}/source" ]; then | ||||
| @@ -200,6 +199,12 @@ gen_index_page() { # Generate an index page (site map) that includes links to th | ||||
|  | ||||
| } | ||||
|  | ||||
| copy_things_in() { | ||||
| 	cp ${BASE_PATH}/styles.css ${BASE_PATH}/output/ | ||||
| 	cp ${BASE_PATH}/files ${BASE_PATH}/output/ | ||||
|  | ||||
| } | ||||
|  | ||||
| clean_up() { | ||||
| 	rm -r ${BASE_PATH}/temp | ||||
| } | ||||
| @@ -212,5 +217,5 @@ del_files_in_output | ||||
| md_to_html | ||||
| gen_sorted_file_list # Sets the 'sorted_file_list' variable | ||||
| gen_index_page "$sorted_file_list" # Uses the 'sorted_file_list' variable | ||||
| copy_things_in | ||||
| clean_up | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user