💥 Ajoute les fonctions communes
This commit is contained in:
3
add.sh
3
add.sh
@@ -14,6 +14,9 @@ cd "${SCRIPT_PATH}/day_${NUMBER}" || exit
|
||||
|
||||
touch input.txt part_1.php part_2.php
|
||||
|
||||
echo -e "<?php\n\ninclude '../functions.php';\n\n" >> part_1.php
|
||||
echo -e "<?php\n\ninclude '../functions.php';\n\n" >> part_2.php
|
||||
|
||||
echo "DONE"
|
||||
|
||||
exit
|
||||
|
||||
10
functions.php
Normal file
10
functions.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
function print_message(string|array $message)
|
||||
{
|
||||
if (is_array($message)) {
|
||||
$message = implode("\n", $message);
|
||||
}
|
||||
|
||||
echo $message."\n";
|
||||
}
|
||||
Reference in New Issue
Block a user