Skip to content

Commit a79f3be

Browse files
committed
feat: script that checks and creates .htaccess file
1 parent c6a79ff commit a79f3be

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

checks/ht-access.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# !/bin/bash
2+
# Checks that .htaccess file exists in the project-website folder and creates one if if it is not
3+
4+
cd .. || exit
5+
cd project-website || exit
6+
7+
if [ ! -f .htaccess ]; then
8+
echo "\033[1;33m Warning: .htaccess not found in the project-website folder. It will be created automatically."
9+
cp settings.htaccess .htaccess
10+
echo ".htaccess file created."
11+
fi
12+
13+
cd .. || exit
14+
cd Headstart || exit

local-hotreload.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
chmod a+x checks/config-js.sh
44
source ./checks/config-js.sh
55

6+
chmod a+x checks/ht-access.sh
7+
source ./checks/ht-access.sh
8+
69
npm run prod -- --mode=development
710
docker compose --env-file ./local_dev/dev.env stop
811
docker compose --env-file ./local_dev/dev.env up -d --build

0 commit comments

Comments
 (0)