Explorar el Código

fix github-actions

Artem V. Ageev hace 8 meses
padre
commit
318f1fbbc5
Se han modificado 2 ficheros con 26 adiciones y 26 borrados
  1. 10 10
      make.ps1
  2. 16 16
      make.sh

+ 10 - 10
make.ps1

@@ -50,16 +50,16 @@ Function Build-Project {
     If ( Test-Path -Path 'use' ) {
         & git submodule update --recursive --init | Out-Host
         & git submodule update --recursive --remote | Out-Host
-    }
-    If ( Test-Path -Path 'use\components.txt' ) {
-        Get-Content -Path 'use\components.txt' | ForEach-Object {
-            If ((! (& lazbuild --verbose-pkgsearch $_)) &&
-                (! (& lazbuild --add-package $_)) &&
-                (! (Test-Path -Path "use\$($_)"))) {
-                    $OutFile = Request-File "https://packages.lazarus-ide.org/$($_).zip"
-                    Expand-Archive -Path $OutFile -DestinationPath "use\$($_)" -Force
-                    Remove-Item $OutFile
-                }
+        If ( Test-Path -Path 'use\components.txt' ) {
+            Get-Content -Path 'use\components.txt' | ForEach-Object {
+                If ((! (& lazbuild --verbose-pkgsearch $_)) &&
+                    (! (& lazbuild --add-package $_)) &&
+                    (! (Test-Path -Path "use\$($_)"))) {
+                        $OutFile = Request-File "https://packages.lazarus-ide.org/$($_).zip"
+                        Expand-Archive -Path $OutFile -DestinationPath "use\$($_)" -Force
+                        Remove-Item $OutFile
+                    }
+            }
         }
         Get-ChildItem -Filter '*.lpk' -Recurse -File –Path 'use' | ForEach-Object {
             & lazbuild --add-package-link $_ | Out-Host

+ 16 - 16
make.sh

@@ -23,22 +23,22 @@ function priv_lazbuild
     if [[ -d 'use' ]]; then
         git submodule update --init --recursive
         git submodule update --recursive --remote
-    fi
-    if [[ -f 'use/components.txt' ]]; then
-        while read -r; do
-            if [[ -n "${REPLY}" ]] &&
-                ! (lazbuild --verbose-pkgsearch "${REPLY}") &&
-                ! (lazbuild --add-package "${REPLY}") &&
-                ! [[ -e "use/${REPLY}" ]]; then
-                    declare -A VAR=(
-                        [url]="https://packages.lazarus-ide.org/${REPLY}.zip"
-                        [out]=$(mktemp)
-                    )
-                    wget --output-document "${VAR[out]}" "${VAR[url]}" 2>/dev/null
-                    unzip -o "${VAR[out]}" -d "use/${REPLY}"
-                    rm --verbose "${VAR[out]}"
-                fi
-        done < 'use/components.txt'
+        if [[ -f 'use/components.txt' ]]; then
+            while read -r; do
+                if [[ -n "${REPLY}" ]] &&
+                    ! (lazbuild --verbose-pkgsearch "${REPLY}") &&
+                    ! (lazbuild --add-package "${REPLY}") &&
+                    ! [[ -e "use/${REPLY}" ]]; then
+                        declare -A VAR=(
+                            [url]="https://packages.lazarus-ide.org/${REPLY}.zip"
+                            [out]=$(mktemp)
+                        )
+                        wget --output-document "${VAR[out]}" "${VAR[url]}" 2>/dev/null
+                        unzip -o "${VAR[out]}" -d "use/${REPLY}"
+                        rm --verbose "${VAR[out]}"
+                    fi
+            done < 'use/components.txt'
+        fi
         find 'use' -type 'f' -name '*.lpk' -exec lazbuild --add-package-link {} +
     fi
     find 'src' -type 'f' -name '*.lpi' \