commit 52afcb6e2c45f527e51870d8faac7f91f15b337a
parent 8fe84c0f2acb8796769d14ea1070dbe59b673889
Author: William Lindholm <a22willi@student.his.se>
Date: Sat, 30 Mar 2024 00:15:31 +0100
Fixed a bug where dotfiles were not copied from the temp repo.
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/init.sh b/init.sh
@@ -2,12 +2,13 @@
# Path to the directory where the repository should be
REPO_PATH="/var/www/html/LenaSYS"
-TEMP_PATH="/var/www/temp/*"
+TEMP_PATH="/var/www/temp"
# Check if the directory is empty
if [ ! "$(ls -A $REPO_PATH)" ]; then
echo "Directory is empty. Copying repository into ${REPO_PATH}..."
- cp -r $TEMP_PATH $REPO_PATH
+ cp -a $TEMP_PATH/.* $REPO_PATH
+ cp -a $TEMP_PATH/* $REPO_PATH
chown -R www-data:www-data $REPO_PATH
else
echo "Repository already exists or directory is not empty."