Skip to content

Commit

Permalink
Fix files installation if no Git repo is avaialable (#1581)
Browse files Browse the repository at this point in the history
  • Loading branch information
qwerty287 authored Nov 7, 2022
1 parent 5bdd75e commit 296db84
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions scripts/install_files.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@
$YELLOW = "\033[38;5;011m";
$ORANGE = "\033[38;5;214m";

echo "\n${YELLOW}creating file for CSS personalization$NO_COLOR" . PHP_EOL;
echo "\n{$YELLOW}creating file for CSS personalization$NO_COLOR" . PHP_EOL;
touch('public/dist/user.css');

echo "\n${YELLOW}creating default SQLite database$NO_COLOR" . PHP_EOL;
echo "\n{$YELLOW}creating default SQLite database$NO_COLOR" . PHP_EOL;
touch('database/database.sqlite');

echo "\n${YELLOW}setting up hooks for git pull and git commits$NO_COLOR" . PHP_EOL;
copy('scripts/pre-commit', '.git/hooks/pre-commit');
copy('scripts/post-merge', '.git/hooks/post-merge');
if (is_dir('.git')) {
echo "\n{$YELLOW}setting up hooks for git pull and git commits$NO_COLOR" . PHP_EOL;
copy('scripts/pre-commit', '.git/hooks/pre-commit');
copy('scripts/post-merge', '.git/hooks/post-merge');
}

echo "\n${ORANGE}To disable the call of composer and migration on pull add$NO_COLOR" . PHP_EOL;
echo "${ORANGE}a file named '.NO_AUTO_COMPOSER_MIGRATE' in this directory.$NO_COLOR" . PHP_EOL;
echo "\n{$ORANGE}To disable the call of composer and migration on pull add$NO_COLOR" . PHP_EOL;
echo "{$ORANGE}a file named '.NO_AUTO_COMPOSER_MIGRATE' in this directory.$NO_COLOR" . PHP_EOL;

0 comments on commit 296db84

Please sign in to comment.