Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue updating duckstation #73

Closed
Nuxf9 opened this issue Oct 7, 2023 · 2 comments
Closed

Issue updating duckstation #73

Nuxf9 opened this issue Oct 7, 2023 · 2 comments

Comments

@Nuxf9
Copy link

Nuxf9 commented Oct 7, 2023

Ducktation isn't updating. Probably because the the app dos not have version listed, only as "latest rolling release".
I deleted the version check on my update file and did solve the issue.

@ivan-hc
Copy link
Owner

ivan-hc commented Oct 7, 2023

I'm looking for update methods (including appimageupdatetool) but nothing works. Having a common linear URL is a problem in this case.

I don't know how the app works and if it is somenthing that can receive updates automatically or something.

In the meantime I suggest to use the option --rollback to download a newer version if you know that it is available. With this new option you can select whatever you want from a menu (NOTE: the AM-updater must be in place to use the option --rollback).

Maybe I can get track of the last update to that branch to give you the new version.

@ivan-hc
Copy link
Owner

ivan-hc commented Oct 7, 2023

OK, I think I have solved, from now the version installed will be compared with the last update, copy paste the following new updater in your AM-updater script and made it executable

#!/usr/bin/env bash
APP=duckstation
REPO="stenzek/duckstation"
version0=$(cat /opt/$APP/version)
version=$(wget -q https://api.github.com/repos/$REPO/releases/latest -O - | grep -w -v i386 | grep -w -v i686 | grep -w -v arm64 | grep -w -v armv7l | grep browser_download_url | grep -i appimage | cut -d '"' -f 4 | head -1)
updatedat=$(wget -q https://api.github.com/repos/$REPO/releases/latest -O - | grep updated_at | cut -d '"' -f 4 | head -1)
if [ $updatedat = $version0 ]; then
  echo "Update not needed!"
else
  notify-send "A new version of $APP is available, please wait"
  mkdir /opt/$APP/tmp
  cd /opt/$APP/tmp
  wget $version
  if ls . | grep mage; then
	cd ..
  	if test -f ./tmp/*mage; then rm ./version
  	fi
  	echo $updatedat >> ./version
  	mv --backup=t ./tmp/*mage ./$APP
  	chmod a+x /opt/$APP/$APP
  	rm -R -f ./tmp ./*~
  fi
  notify-send "$APP is updated!"
fi

Now I'll go to replace the existing installer.

ivan-hc added a commit that referenced this issue Oct 7, 2023
@ivan-hc ivan-hc closed this as completed Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants