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

Fixed rbw-agent #1084

Merged
merged 3 commits into from
Nov 6, 2024
Merged

Fixed rbw-agent #1084

merged 3 commits into from
Nov 6, 2024

Conversation

00sapo
Copy link
Contributor

@00sapo 00sapo commented Nov 6, 2024

Not tested (I have just created the symlink on my machine where I had installed it with appman)

@Samueru-sama
Copy link
Contributor

Samueru-sama commented Nov 6, 2024

line 12 has to be changed to add the extra symlink you added to the remover script, otherwise a broken link will be left in /usr/local/bin when the app is uninstalled.

normally that extra file is a .desktop but in this case it would be that symlink.

tldr: printf '\n%s' "rm -f /usr/local/bin/$APPAGENT" >> ../remove

@@ -45,6 +49,7 @@ if [ "$version" != "$version0" ]; then
cd ..
if [ -d ./tmp/* 2>/dev/null ]; then mv --backup=t ./tmp/*/* ./; else mv --backup=t ./tmp/* ./"$APP" 2>/dev/null || mv --backup=t ./tmp/* ./; fi
chmod a+x ./"$APP" || exit 1
chmod a+x ./"$APPAGENT" || exit 1

This comment was marked as off-topic.

@ivan-hc
Copy link
Owner

ivan-hc commented Nov 6, 2024

Take the installation script for Bottles as an example

#!/bin/sh

# AM INSTALL SCRIPT VERSION 3.5
set -u
APP=bottles
SITE="ivan-hc/Bottles-appimage"

# CREATE DIRECTORIES AND ADD REMOVER
[ -n "$APP" ] && mkdir -p "/opt/$APP/tmp" "/opt/$APP/icons" && cd "/opt/$APP/tmp" || exit 1
printf "#!/bin/sh\nset -e\nrm -f /usr/local/bin/$APP /usr/local/bin/$APP-cli\nrm -R -f /opt/$APP" > ../remove
printf '\n%s' "rm -f /usr/local/share/applications/$APP-AM.desktop" >> ../remove
chmod a+x ../remove || exit 1

# DOWNLOAD AND PREPARE THE APP, $version is also used for updates
version=$(curl -Ls https://api.github.com/repos/ivan-hc/Bottles-appimage/releases/latest | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | head -1)
wget "$version" || exit 1
# Keep this space in sync with other installation scripts
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
cd ..
mv ./tmp/*mage ./"$APP"
# Keep this space in sync with other installation scripts
rm -R -f ./tmp || exit 1
echo "$version" > ./version
chmod a+x ./"$APP" || exit 1

# LINK TO PATH
ln -s "/opt/$APP/$APP" "/usr/local/bin/$APP"
ln -s "/opt/$APP/$APP" "/usr/local/bin/$APP-cli"

# SCRIPT TO UPDATE THE PROGRAM

note the "remove" script (the first printf reference)...

# CREATE DIRECTORIES AND ADD REMOVER
[ -n "$APP" ] && mkdir -p "/opt/$APP/tmp" "/opt/$APP/icons" && cd "/opt/$APP/tmp" || exit 1
printf "#!/bin/sh\nset -e\nrm -f /usr/local/bin/$APP /usr/local/bin/$APP-cli\nrm -R -f /opt/$APP" > ../remove
printf '\n%s' "rm -f /usr/local/share/applications/$APP-AM.desktop" >> ../remove
chmod a+x ../remove || exit 1

...and the symlink

# LINK TO PATH
ln -s "/opt/$APP/$APP" "/usr/local/bin/$APP"
ln -s "/opt/$APP/$APP" "/usr/local/bin/$APP-cli"

@ivan-hc ivan-hc merged commit c01bf51 into ivan-hc:main Nov 6, 2024
ivan-hc added a commit that referenced this pull request Nov 7, 2024
* Fixed rbw-agent (#1084)

* Add reaper

fix #1085

* Update reaper

#1085 (comment)

* Update APP-MANAGER

...add options to enable/disable notifications

fix #1086

* Update README.md

* Update reaper

* "AM" 9.0.2, allow to use icon theme immediately after installation (#1091)

* Move the function to export the icons to the main CLI

* Allow use of custom icon themes after installation

* Update APP-MANAGER

* Update README.md

---------

Co-authored-by: Federico Simonetta <[email protected]>
Co-authored-by: Raul Dipeas <[email protected]>
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

Successfully merging this pull request may close these issues.

3 participants