Bugfix: Neuste verfügbare Version konnte nicht mehr ermittelt werden
This commit is contained in:
		@@ -16,6 +16,11 @@ handleError() {
 | 
			
		||||
	EOT
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
err() {
 | 
			
		||||
  echo "${COLOR_RED}$*${COLOR_RESET}"
 | 
			
		||||
  exit 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
showLogo() {
 | 
			
		||||
  echo -n "${COLOR_GREEN}"
 | 
			
		||||
  cat <<-'EOT'
 | 
			
		||||
@@ -62,7 +67,8 @@ showHelp() {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
getVersionLatest() {
 | 
			
		||||
  VERSION_LATEST="$( wget -qO - https://github.com/logseq/logseq/releases/latest | grep -Poi "Logseq-linux-x64-\K\d\.\d\.\d" | head -n 1 )"
 | 
			
		||||
  VERSION_LATEST="$( wget -qO - https://github.com/logseq/logseq/releases/latest | grep -Poi "releases/tag/\K\d\.\d\.\d" | head -n 1 )"
 | 
			
		||||
  [ -n "$VERSION_LATEST" ] || err "Konnte nicht ermittelt werden"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
getVersionCurrent() {
 | 
			
		||||
@@ -74,11 +80,12 @@ getVersionCurrent() {
 | 
			
		||||
  else
 | 
			
		||||
    VERSION_CURRENT=
 | 
			
		||||
  fi
 | 
			
		||||
  [ -n "$VERSION_CURRENT" ] || err "Konnte nicht ermittelt werden"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
getLatest() {
 | 
			
		||||
  local URL
 | 
			
		||||
  URL="https://github.com$( wget -qO - https://github.com/logseq/logseq/releases/latest | grep -Poi "/logseq.*AppImage" )"
 | 
			
		||||
  URL="https://github.com/logseq/logseq/releases/download/$VERSION_LATEST/Logseq-linux-x64-$VERSION_LATEST.AppImage"
 | 
			
		||||
  local DIR_DEST
 | 
			
		||||
  DIR_DEST=~/.local/bin
 | 
			
		||||
  local FILE_LINK
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user