openlens.sh 545 B

12345678910111213141516
  1. #!/bin/bash
  2. bin=~/.bin/openlens
  3. repo=MuhammedKalkan/OpenLens
  4. # if redis binary is not found, download it
  5. if [ ! -f $bin ]; then
  6. echo "Downloading openlens binary..."
  7. filename=$(curl -s https://api.github.com/repos/$repo/releases/latest | jq -r '.assets[].name' | grep "x86_64.AppImage$")
  8. fileurl=$(curl -s https://api.github.com/repos/$repo/releases/latest | jq -r --arg filename $filename '.assets[] | select(.name == $filename) | .browser_download_url')
  9. wget -q -O $bin $fileurl
  10. chmod +x $bin
  11. fi
  12. # execute leapp
  13. $bin -f -i $1 -o $2