Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
cpanato committed Feb 21, 2024
1 parent f731a9b commit 20672ba
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ runs:
# Download custom gptscript
log_info "Downloading platform-specific version 'v${{ inputs.gptscript-release }}' of gptscript...\n https://github.com/gptscript-ai/gptscript/releases/download/v${{ inputs.gptscript-release }}/${desired_gptscript_filename}"
# $SUDO curl -sL https://github.com/gptscript-ai/gptscript/releases/download/v${{ inputs.gptscript-release }}/${desired_gptscript_filename} -o ${desired_gptscript_filename}
$SUDO curl -sL https://github.com/gptscript-ai/gptscript/releases/download/v${{ inputs.gptscript-release }}/${desired_gptscript_filename} -o ${desired_gptscript_filename}
$SUDO curl -sL https://github.com/gptscript-ai/gptscript/releases/download/v${{ inputs.gptscript-release }}/checksums.txt -o checksums.txt
cat checksums.txt
sha256sum ${desired_gptscript_filename}
ls -la
if [[ ${{ runner.os }} == "Windows" ]]; then
log_info ">>> '${{ runner.os }}'"
filesha256=$(cat checksums.txt | grep ${desired_gptscript_filename} | cut -d' ' -f1)
Expand All @@ -145,7 +145,12 @@ runs:
ret=$?
if [[ $ret -eq 0 ]]; then
log_info "unpacking!"
$SUDO unzip "${desired_gptscript_filename}" -d "${{ inputs.install-dir }}"
if [[ "${desired_gptscript_filename}" == *".zip"* ]]; then
$SUDO unzip "${desired_gptscript_filename}" -d "${{ inputs.install-dir }}"
else
$SUDO tar xzf "${desired_gptscript_filename}" -C "${{ inputs.install-dir }}"
fi
$SUDO rm -f checksums.txt
$SUDO rm -f "${desired_gptscript_filename}"
log_info "Installation complete!"
Expand Down

0 comments on commit 20672ba

Please sign in to comment.