-
Notifications
You must be signed in to change notification settings - Fork 0
/
update_submodules.sh
executable file
·46 lines (34 loc) · 1.1 KB
/
update_submodules.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
rm -rf src/lib/labouvroir
git submodule update --init --recursive --remote
# Copy profile images
source_directory="./src/lib/labouvroir/equipe/profile-img"
target_directory="./static/team"
# Check if source directory exists
if [ ! -d "$source_directory" ]; then
echo "Source (profile-img) directory does not exist."
exit 1
fi
# Check if target directory exists
if [ ! -d "$target_directory" ]; then
echo "Target directory does not exist. Creating it now."
mkdir -p "$target_directory"
fi
# Copy all files
cp "$source_directory"/* "$target_directory"
# Copy project images
source_directory="./src/lib/labouvroir/projets/images"
target_directory="./static/images/projets"
# Check if source directory exists
if [ ! -d "$source_directory" ]; then
echo "Source (images) directory does not exist."
exit 1
fi
# Check if target directory exists
if [ ! -d "$target_directory" ]; then
echo "Target directory does not exist. Creating it now."
mkdir -p "$target_directory"
fi
# Copy all files and directories recursively
cp -r "$source_directory"/* "$target_directory"
echo "Files copied successfully!"