Made page gathering dynamic, added favicon, included css, worked on some content, created first bash page. Still very much in-progress but the framework is pretty much done. Needs more CSS and content.
This commit is contained in:
16
run.sh
16
run.sh
@ -2,13 +2,27 @@
|
||||
# 2022-09-14 Hyperling
|
||||
# Ensure dependencies are met and start the webserver.
|
||||
|
||||
# Ensure we are executing from this file's directory.
|
||||
cd `dirname $0`
|
||||
|
||||
### Can docker-compose do this rather than running a sh file on the host OS?
|
||||
# Look at Dockerfile-ADD for doing git clones into a docker environment.
|
||||
# Out of scope for this project, this project is just the site.
|
||||
# Out of scope for this project, this project is just the site, leave for now.
|
||||
if [[ ! `which php` || ! `which node`|| ! `which npm` ]]; then
|
||||
sudo apt install -y php-fpm nodejs npm
|
||||
fi
|
||||
|
||||
# Fix any file permissions
|
||||
# Directories and allowed page types are executable, others are not.
|
||||
find ./pages/ | while read file; do
|
||||
if [[ $file == *".php" || $file == *".sh" || -d $file ]]; then
|
||||
mode=755
|
||||
else
|
||||
mode=644
|
||||
fi
|
||||
chmod -c $mode $file
|
||||
done
|
||||
|
||||
npm install
|
||||
|
||||
./main.js
|
||||
|
Reference in New Issue
Block a user