if [ -n "${gitlabBranch}" ]; then
echo "gitlabBranch is set ${gitlabBranch}"
else
echo "gitlabBranch isn't set"
exit 1
fi
девушек => девушк
#!/bin/bash
if [ -n "$1" ]
then
if ! [ -d /var/www/$1/ ]
then
echo "Message: Create directory ' /var/www/$1/ '"
mkdir /var/www/$1/
if [ -d /var/www/$1/ ]
then
echo "Successfull: create directory ' /var/www/$1/ '"
echo "<?php echo 'hello world. site automaticaly added';?>" > /var/www/$1/index.php
chown -R apache:apache /var/www/$1/
else
echo "Error: i cat't add directory ' /var/www/$1/ '"
fi
if ! [ -f /etc/httpd/httpd-add/$1.conf ]
then
echo "Create config file /etc/httpd/httpd-add/$1.conf"
STRING="<VirtualHost *:80>
\tServerAdmin admin@site.ru
\tDocumentRoot /var/www/$1
\tServerName $1.site.ru
\tErrorLog logs/$1-error.log
\tLogFormat \"%h %l %u %t \\\"%r\\\" %>s %b\" common
\tCustomLog logs/$1-access.log common
\t<Directory \"/var/www/$1\">
\t\tAllowOverride all
\t\tOrder allow,deny
\t\tAllow from all
\t</Directory>
</VirtualHost>"
echo -e "$STRING" > /etc/httpd/httpd-add/$1.conf
if [ -f /etc/httpd/httpd-add/$1.conf ]
then
echo -e "Successfull: add configuration:\n$STRING"
else
echo "Error: i can't add configuration file to '/etc/httpd/httpd-add/$1.conf ' "
fi
else
echo "Error: config file '/etc/httpd/httpd-add/$1.conf ' exits"
fi
else
echo "Error: directory ' /var/www/$1/ ' exist"
fi
else
echo 'No argument!'
fi
function pasternak(){
var $peshki = $(".slide.active p");
if ($peshki.length > 0)
{
console.log("I FIND IT");
}
else
{
console.log("TRY AGAIN!");
}
}
while (true) {
$string = yield;
echo $string."\n";
}
function printer() {
$line = 1;
while (true) {
$string = yield;
echo ($line++).$string.PHP_EOL;
}
}
$printer = printer();
$printer->send('Hello world!');
$printer->send('Bye world!');