forked from ArcoMul/netlify-cats
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
21 lines (16 loc) · 671 Bytes
/
build.sh
File metadata and controls
21 lines (16 loc) · 671 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# The following script is executed to 'build' an index.html file
# Based on the following commands (these are normal command line commands)
# an index.html file is generated, which is then shown online
# Empty index.html
> index.html
# Merge header.html into index.html
cat header.html >> index.html
# Apply some settings for the following for-loop
shopt -s nullglob # Sets nullglob
shopt -s nocaseglob # Sets nocaseglob
# For each image in the folder print it into an <img> tag in index.html
for filename in ./cats/*.{jpg,jpeg,png}; do
echo ' <img src="' $filename '"/>' >> index.html
done
# Merge footer.html into index.html
cat footer.html >> index.html