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