mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-12-22 09:40:23 -05:00
Use grep -e instead of egrep and delete the package-lock.json if it exists before running npm install in the init.sh
This commit is contained in:
parent
e89191027b
commit
e4cab7cb86
1 changed files with 6 additions and 1 deletions
7
init.sh
7
init.sh
|
@ -74,7 +74,7 @@ php artisan route:clear
|
|||
msg "Running: ${c_m}php artisan view:clear"
|
||||
php artisan view:clear
|
||||
|
||||
egrep -q '^CACHE_BUST=' .env || {
|
||||
grep -qe '^CACHE_BUST=' .env || {
|
||||
msg "Adding the ${c_y}CACHE_BUST$c_w variable"
|
||||
printf '\n%s\n' 'CACHE_BUST=' >> .env
|
||||
}
|
||||
|
@ -87,6 +87,11 @@ sed -i 's|^CACHE_BUST=.*|CACHE_BUST='"$(tr -dc A-Za-z0-9 </dev/urandom | head -c
|
|||
php artisan migrate || error "${c_m}php artisan migrate$c_w exited with an error status"
|
||||
}
|
||||
|
||||
[[ -f package-lock.json ]] && {
|
||||
msg "Deleting: ${c_y}package-lock.json$c_w"
|
||||
rm package-lock.json
|
||||
}
|
||||
|
||||
msg "Running: ${c_m}npm install"
|
||||
npm prune && npm install --production || error "${c_m}npm prune && npm install --production$c_w exited with an error status"
|
||||
|
||||
|
|
Loading…
Reference in a new issue