/[sudobot]/trunk/scripts/build-extensions.sh
ViewVC logotype

Diff of /trunk/scripts/build-extensions.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 623 by rakinar2, Mon Jul 29 17:59:26 2024 UTC revision 624 by rakinar2, Fri Aug 30 10:10:33 2024 UTC
# Line 1  Line 1 
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)"
# Line 25  for extension in $extensions; do Line 31  for extension in $extensions; do
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

Legend:
Removed from v.623  
changed lines
  Added in v.624

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26