build script works from anywhere
This commit is contained in:
		
							
								
								
									
										6
									
								
								build.sh
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								build.sh
									
									
									
									
									
								
							@@ -1,5 +1,9 @@
 | 
				
			|||||||
echo "Starting build..."
 | 
					echo "Starting build..."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					SOURCE=${BASH_SOURCE[0]}
 | 
				
			||||||
 | 
					DIR_OF_THIS_SCRIPT="$( dirname "$SOURCE" )"
 | 
				
			||||||
 | 
					ABS_DIR_OF_SCRIPT="$( realpath $DIR_OF_THIS_SCRIPT )"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# TODO: Check if current version is latest to avoid redundant installation
 | 
					# TODO: Check if current version is latest to avoid redundant installation
 | 
				
			||||||
if [[ -f "tailwindcss" ]]
 | 
					if [[ -f "tailwindcss" ]]
 | 
				
			||||||
then
 | 
					then
 | 
				
			||||||
@@ -39,6 +43,6 @@ fi
 | 
				
			|||||||
echo "Compiling tailwindcss and building zola project..."
 | 
					echo "Compiling tailwindcss and building zola project..."
 | 
				
			||||||
rm -rf public static/css
 | 
					rm -rf public static/css
 | 
				
			||||||
./tailwindcss -i css/index.css -o ./static/css/index.css --minify
 | 
					./tailwindcss -i css/index.css -o ./static/css/index.css --minify
 | 
				
			||||||
zola build
 | 
					zola --root $ABS_DIR_OF_SCRIPT build
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user