-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_temp_w.sh
More file actions
41 lines (36 loc) · 1.45 KB
/
create_temp_w.sh
File metadata and controls
41 lines (36 loc) · 1.45 KB
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
#!/bin/bash
globct() {
local option="$1"
local name="$2"
local nb="$3"
if [ "$#" -ne 3 ]; then
echo "Usage: globct <option> <name> <nb>"
return 1
fi
if [ "$option" = "cnnb" ]; then
git clone https://votre_repository.git "$name"
elif [ "$option" = "cwnb" ]; then
git clone https://votre_repository.git "$name"
elif [ "$option" = "lnnb" ]; then
cp -r -u /localisation_de_votre_template/template-html-css-responive "$name"
elif [ "$option" = "lwnb" ]; then
cp -r -u /localisation_de_votre_template/template-html-css-responive-with-nav-bar "$name"
elif [ "$option" = "lnnbm" ]; then
cp -r -u /localisation_de_votre_template/template-html-css-responive-multi-page "$name"
for ((c=1; c<=nb; c++))
do
cp -r -u /localisation_de_votre_template/template-html-css-responive-multi-page/html/page-1.html "$name"/html/page-"$c".html
done
elif [ "$option" = "lwnbm" ]; then
cp -r -u /localisation_de_votre_template/template-html-css-responive-with-nav-bar-multi-page "$name"
for ((c=1; c<=nb; c++))
do
cp -r -u /localisation_de_votre_template/template-html-css-responive-with-nav-bar-multi-page/html/page-1.html "$name"/html/page-"$c".html
done
else
echo "Option invalide : $option"
return 1
fi
}
# Utilisation de la fonction avec un nom de projet en argument
globct "$1" "$2" "$3"