1 |
#!/bin/bash |
#!/bin/bash |
2 |
|
|
3 |
extensions=$(find . -maxdepth 1 -type d -not -name . -not -name .git -not -name .extbuild -not -name .extbuilds) |
dir="." |
4 |
|
|
5 |
|
if [ ! -z "$1" ]; then |
6 |
|
dir="$1" |
7 |
|
fi |
8 |
|
|
9 |
|
extensions=$(find $dir -maxdepth 1 -type d -not -wholename $dir -not -name . -not -name .git -not -name .extbuild -not -name .extbuilds) |
10 |
failed_builds=() |
failed_builds=() |
11 |
extbuilds_final_dir=$(pwd)/.extbuilds |
extbuilds_final_dir=$(pwd)/.extbuilds |
12 |
|
|
13 |
for extension in $extensions; do |
for extension in $extensions; do |
14 |
name=$(basename $extension) |
name=$(basename $extension) |
15 |
echo "BUILD $name" |
echo "PROCESS $name" |
16 |
|
|
17 |
cd $extension |
cd $extension |
18 |
echo "PWD $(pwd)" |
echo "PWD $(pwd)" |
31 |
|
|
32 |
npm install -D |
npm install -D |
33 |
|
|
34 |
|
if [ -z "$BUN" ] || [ "$BUN" != "1" ]; then |
35 |
|
echo "PREPARE $name" |
36 |
|
rm -f "tsconfig.json" |
37 |
|
ln -s "tsconfig.node.json" "tsconfig.json" |
38 |
|
else |
39 |
|
echo "Bun extension build with this script is not supported yet" |
40 |
|
continue |
41 |
|
fi |
42 |
|
|
43 |
if [ $? -eq 0 ]; then |
if [ $? -eq 0 ]; then |
44 |
if [ -z "$build_command" ] || test "$build_command" = "null"; then |
if [ -z "$build_command" ] || test "$build_command" = "null"; then |
45 |
echo "NOBUILD $name" |
echo "NOBUILD $name" |
46 |
else |
else |
47 |
|
echo "BUILD $name" |
48 |
eval $build_command |
eval $build_command |
49 |
|
|
50 |
if [ $? -ne 0 ]; then |
if [ $? -ne 0 ]; then |