Skip to content

Commit c33711d

Browse files
authored
fix: Modify docs.sh to conditionally copy public folder (#795)
This fixes an error. Updated the script to copy the 'public' folder only if it contains files.
1 parent 7d3df81 commit c33711d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

samples/docs.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,6 @@ cp "${SCRIPT_DIR}/${NAME}/index.html" "${DOCS_DIR}/index.html"
2828
cp "${SCRIPT_DIR}/${NAME}/style.css" "${DOCS_DIR}/style.css"
2929

3030
# Copy the data folder if one is found.
31-
# [ -d "public" ] && cp -r public/* "${DOCS_DIR}/"
31+
if [ -d "public" ] && [ "$(ls -A public)" ]; then
32+
cp -r public/* "${DOCS_DIR}/"
33+
fi

0 commit comments

Comments
 (0)