@@ -151,29 +151,29 @@ jobs:
151
151
run : |
152
152
- name : Find and Extract OpenNLP Distribution
153
153
run : |
154
- # Find the first non-src .tar.gz file in the target directory
155
- $TAR_FILE = Get-ChildItem -Path opennlp-distr/target -Filter "*.tar.gz" | Where-Object { $_.Name -notlike "*-src*" } | Select-Object -First 1
156
-
157
- # Ensure we found a file
158
- if (-not $TAR_FILE) {
159
- Write-Error "Error : No matching tar.gz file found in opennlp-distr/target"
160
- exit 1
161
- }
162
-
163
- # Extract the tar.gz file to the user profile directory
164
- $Destination = "$env:USERPROFILE"
165
- tar -xzf $TAR_FILE.FullName -C $Destination
166
-
167
- # Get the directory name of the extracted content (excluding the tar path)
168
- $EXTRACTED_DIR = (tar -tf $TAR_FILE.FullName | Select-Object -First 1).Split('/')[0]
169
-
170
- # Set OPENNLP_HOME dynamically in the environment
171
- $OPENNLP_HOME_PATH = "$env:USERPROFILE\$EXTRACTED_DIR"
172
- Write-Host "OPENNLP_HOME=$OPENNLP_HOME_PATH" # Debugging
173
-
174
- # Set the environment variable for future steps
175
- echo "OPENNLP_HOME=$OPENNLP_HOME_PATH" >> $GITHUB_ENV
176
- echo "$OPENNLP_HOME_PATH\bin" >> $GITHUB_PATH
154
+ # Find the first non-src .tar.gz file in the target directory
155
+ $TAR_FILE = Get-ChildItem -Path opennlp-distr/target -Filter "*.tar.gz" | Where-Object { $_.Name -notlike "*-src*" } | Select-Object -First 1
156
+
157
+ # Ensure we found a file
158
+ if (-not $TAR_FILE) {
159
+ Write-Error "Error : No matching tar.gz file found in opennlp-distr/target"
160
+ exit 1
161
+ }
162
+
163
+ # Extract the tar.gz file to the user profile directory
164
+ $Destination = "$env:USERPROFILE"
165
+ tar -xzf $TAR_FILE.FullName -C $Destination
166
+
167
+ # Get the directory name of the extracted content (excluding the tar path)
168
+ $EXTRACTED_DIR = (tar -tf $TAR_FILE.FullName | Select-Object -First 1).Split('/')[0]
169
+
170
+ # Set OPENNLP_HOME dynamically in the environment
171
+ $OPENNLP_HOME_PATH = "$env:USERPROFILE\$EXTRACTED_DIR"
172
+ Write-Host "OPENNLP_HOME=$OPENNLP_HOME_PATH" # Debugging
173
+
174
+ # Set the environment variable for future steps
175
+ echo "OPENNLP_HOME=$OPENNLP_HOME_PATH" >> $GITHUB_ENV
176
+ echo "$OPENNLP_HOME_PATH\bin" >> $GITHUB_PATH
177
177
178
178
- name : Verify Extraction
179
179
run : |
0 commit comments