Révision 152165a8
Ajouté par Julien Enselme il y a plus de 9 ans
bin/scripts-utils.sh | ||
---|---|---|
117 | 117 |
} |
118 | 118 |
|
119 | 119 |
update_nginx_map() { |
120 |
nginx_map_template='map $uri $subsite {\n |
|
121 |
~^/(?P<sub>%%PATTERN%%) $sub;\n |
|
122 |
}\n' |
|
123 | 120 |
new_nginx_map_pattern=$(cat $nginx_site_names | tr "\n" "|" | head -c -1) |
124 |
new_nginx_sites_map=${nginx_map_template/"%%PATTERN%%"/$new_nginx_map_pattern} |
|
125 |
|
|
126 |
echo -e $new_nginx_sites_map > $nginx_sites_map |
|
121 |
sed s+"%%PATTERN%%"+"$new_nginx_map_pattern"+ < $nginx_map_template > $nginx_sites_map |
|
127 | 122 |
} |
Formats disponibles : Unified diff
Correct update_nginx_map: previous syntax was bash only.