Skip to content

Commit f68d5da

Browse files
authored
Merge pull request #776 from ivan-hc/dev
Version 7
2 parents fe0af4b + 73aae45 commit f68d5da

37 files changed

+111
-1289
lines changed

APP-MANAGER

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
AMVERSION="6.16"
3+
AMVERSION="7"
44

55
# Determine main repository and branch
66
AMREPO="https://raw.githubusercontent.com/ivan-hc/AM/main"

README.md

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,26 @@ You can consult the entire **list of managed apps** at [**portable-linux-apps.gi
8181

8282
Both can be updated using "[Topgrade](https://github.com/topgrade-rs/topgrade)".
8383

84+
------------------------------------------------------------------------
85+
8486
### Ownership
8587
- "**AM**" is owned by the user that have installed it, since other users have not read/write permissions in "/opt/am";
8688
- "**AppMan**" is for all users, since it works locally, everyone can have its own apps and configurations.
8789

90+
------------------------------------------------------------------------
91+
8892
### About "sudo" usage
8993
- "AppMan" can request the root password only in the very rare case in which you want to install a library;
9094
- "AM" requires the root password only to install, remove apps, enable a sandbox for an AppImage, or enable/disable bash completion.
9195

9296
All options cannot be executed with "`sudo`".
9397

98+
------------------------------------------------------------------------
99+
94100
### How apps are installed
101+
102+
------------------------------------------------------------------------
103+
95104
- "**AM**" installs apps system wide, in `/opt` (see [Linux Standard Base](https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s13.html)), using the following structure:
96105
```
97106
/opt/$PROGRAM/
@@ -100,16 +109,18 @@ All options cannot be executed with "`sudo`".
100109
/opt/$PROGRAM/remove
101110
/opt/$PROGRAM/icons/$ICON-NAME
102111
/usr/local/bin/$PROGRAM
103-
/usr/share/applications/AM-$PROGRAM.desktop
104-
```
105-
If the distro is immutable or have read-only mount points instead, the path of the launcher (the last line above) will change like this:
106-
```
107-
/usr/local/share/applications/AM-$PROGRAM.desktop
112+
/usr/local/share/applications/$PROGRAM-AM.desktop
108113
```
109-
NOTE, all installation scripts created or updated after June 28, 2024 will install launchers in /usr/local/share/applications with the "-AM.desktop" extension instead of the "AM-" suffix, like this:
114+
NOTE, all installation scripts used before June 28, 2024 show launchers in /usr/share/applications with suffix "AM-" instead of the "AM.desktop" extension, like this:
115+
110116
```
111-
/usr/local/share/applications/$PROGRAM-AM.desktop
117+
/usr/share/applications/AM-$PROGRAM.desktop
112118
```
119+
From 8 July 2024 this configuration is no longer available. Reinstall the application to get the new configuration.
120+
121+
The change to the default location for .desktop files from /usr/share/applications to /usr/local/share/applications was made to bring "AM" in line with GNU/Linux standards for installing system-wide third-party applications, see [here](https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s09.html).
122+
123+
------------------------------------------------------------------------
113124

114125
- "**AppMan**" is more flexible, since it asks you where to install the apps in your $HOME directory. For example, suppose you want install everything in "Applicazioni" (the italian of "applications"), this is the structure of what an installation scripts installs with "AppMan" instead:
115126
```
@@ -119,16 +130,20 @@ NOTE, all installation scripts created or updated after June 28, 2024 will insta
119130
~/Applicazioni/$PROGRAM/remove
120131
~/Applicazioni/$PROGRAM/icons/$ICON-NAME
121132
~/.local/bin/$PROGRAM
122-
~/.local/share/applications/AM-$PROGRAM.desktop
133+
~/.local/share/applications/$PROGRAM-AM.desktop
123134
```
124-
NOTE, all installation scripts created or updated after June 28, 2024 will install launchers with the "-AM.desktop" extension instead of the "AM-" suffix, like this:
135+
NOTE, all installation scripts used before June 28, 2024 show the launchers with suffix "AM-" instead of the "AM.desktop" extension, like this:
125136
```
126-
~/.local/share/applications/$PROGRAM-AM.desktop
137+
~/.local/share/applications/AM-$PROGRAM.desktop
127138
```
139+
From 8 July 2024 this configuration is no longer available. Reinstall the application to get the new configuration.
140+
128141
The configuration file for AppMan is in `~/.config/appman` and contains the path you indicated at first startup. Changing its contents will result in changing the paths for each subsequent operation carried out with "AppMan", the apps and modules stored in the old path will not be manageable.
129142

130143
At first startup you can indicate any directory or subdirectory you want, as long as it is in your $HOME.
131144

145+
------------------------------------------------------------------------
146+
132147
### How to use "AM" in non-privileged mode, like "AppMan"
133148
As already mentioned above, at "[Ownership](#ownership)" the user who installed "AM" is the sole owner, having write permissions for both /opt/am and for all installed apps.
134149

@@ -250,7 +265,7 @@ Below are the **essential system dependencies** that you must install before pro
250265

251266
NOTE: use "AppMan" for non privileged use or if you prefer to gain administration privileges using alternative commands such as `doas` or similar.
252267

253-
#### Extra dependences (you may not need them)
268+
#### Extra dependences (recommended)
254269
The following are optional dependencies that some programs may require:
255270
- "`binutils`", contains a series of basic commands, including "`ar`" which extracts .deb packages;
256271
- "`unzip`", to extract .zip packages;
@@ -1297,15 +1312,17 @@ The reasons may be two:
12971312
------------------------------------------------------------------------
12981313
# Related projects
12991314
#### External tools and forks used in this project
1300-
- [aisap](https://github.com/mgord9518/aisap)
1301-
- [appimagetool/go-appimage](https://github.com/probonopd/go-appimage)
1302-
- [pkg2appimage](https://github.com/AppImage/pkg2appimage)
1315+
- [aisap](https://github.com/mgord9518/aisap), sandboxing solutions for AppImages
1316+
- [appimagetool/go-appimage](https://github.com/probonopd/go-appimage), get rid of libfuse2 from your AppImages
1317+
- [pkg2appimage](https://github.com/AppImage/pkg2appimage), create AppImages on the fly from existing .deb packages
1318+
- [repology](https://github.com/repology), the encyclopedia of all software versions
13031319

13041320
#### My other projects
1305-
- [AppImaGen](https://github.com/ivan-hc/AppImaGen), a script that generates AppImages from Debian or from a PPA for the previous Ubuntu LTS;
1306-
- [ArchImage](https://github.com/ivan-hc/ArchImage), build AppImage packages for all distributions but including Arch Linux packages. Powered by JuNest;
1307-
- [Firefox for Linux scripts](https://github.com/ivan-hc/Firefox-for-Linux-scripts), easily install the official releases of Firefox for Linux.
1308-
- [My AppImage packages](https://github.com/ivan-hc#my-appimage-packages)
1321+
- [AppImaGen](https://github.com/ivan-hc/AppImaGen), easily create AppImages from Ubuntu PPAs or Debian using pkg2appimage and appimagetool;
1322+
- [ArchImage](https://github.com/ivan-hc/ArchImage), create AppImages for all distributions using Arch Linux packages. Powered by JuNest;
1323+
- [Firefox for Linux scripts](https://github.com/ivan-hc/Firefox-for-Linux-scripts), easily install the official releases of Firefox for Linux;
1324+
- [My AppImage packages](https://github.com/ivan-hc#my-appimage-packages) the complete list of packages managed by me and available in this database;
1325+
- [Snap2AppImage](https://github.com/ivan-hc/Snap2AppImage), try to convert Snap packages to AppImages.
13091326

13101327
------------------------------------------------------------------------
13111328

modules/download.am

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,9 @@ function _convert_to_appman_compatible_script() {
99
if test -f "$APPMANCONFIG"/appman-config; then
1010
APPSPATH=$(cat "$APPMANCONFIG"/appman-config)
1111
sed -i "s# /usr/local/bin# $HOME/.local/bin#g" ./$arg
12-
sed -i "s# /usr/bin# $HOME/.local/bin#g" ./$arg
1312
sed -i "s# /usr/games# $HOME/.local/bin#g" ./$arg
1413
sed -i "s# /usr/local/games# $HOME/.local/bin#g" ./$arg
15-
sed -i "s# /usr/share/applications# $DATADIR/applications#g" ./$arg
1614
sed -i "s# /usr/local/share/applications# $DATADIR/applications#g" ./$arg
17-
sed -i "s# /usr/share/pixmaps# $DATADIR/icons#g" ./$arg
1815
sed -i "s# /usr/local/share/pixmaps# $DATADIR/icons#g" ./$arg
1916
sed -i "s# /opt# $HOME/$APPSPATH#g" ./$arg
2017
sed -i "s#/opt/#$HOME/$APPSPATH/#g" ./$arg

modules/install.am

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,6 @@ function _install_common_patch() {
2020
if wget --version | head -1 | grep -q ' 1.'; then
2121
sed -i "s#wget #wget -q --no-verbose --show-progress --progress=bar #g" ./"$arg"
2222
fi
23-
# Silence "mv", "sed" errors and "squashfs-root" messages
24-
if ! grep -q "VERSION 3.5" ./"$arg"; then
25-
sed -i 's/ \&& mv/ | grep -v "squashfs-root" | grep -v ":" | grep -v "help"; mv/g' ./"$arg"
26-
sed -i '/appimage-extract/ s/$/ 2>\&1 | grep -v "squashfs-root" | grep -v ":" | grep -v "help"/' ./"$arg"
27-
sed -i '/^mv / s/$/ 2>\/dev\/null | grep -v "squashfs-root" | grep -v ":" | grep -v "help"/' ./"$arg"
28-
sed -i '/^sed / s/$/ 2>\/dev\/null | grep -v "squashfs-root" | grep -v ":" | grep -v "help"/' ./"$arg"
29-
sed -i '/squashfs-root/ s/$/ 2>\/dev\/null | grep -v "squashfs-root" | grep -v ":" | grep -v "help"/' ./"$arg"
30-
fi
3123
fi
3224
sed -i "s# https://api.github.com#$HeaderAuthWithGITPAT https://api.github.com#g" ./"$arg"
3325
}
@@ -37,25 +29,14 @@ function _install_appman_local_patch() {
3729
sed -i "s# /opt# $APPSPATH#g" ./"$arg"
3830
sed -i "s# /usr/local/bin# $BINDIR#g" ./"$arg"
3931
sed -i 's# "/usr/local/bin# "'"$BINDIR"'#g' ./"$arg"
40-
sed -i "s# /usr/bin# $BINDIR#g" ./"$arg"
41-
sed -i "s# /usr/local/games# $BINDIR#g" ./"$arg"
42-
sed -i "s# /usr/games# $BINDIR#g" ./"$arg"
43-
sed -i "s# /usr/share/applications# $DATADIR/applications#g" ./"$arg"
4432
sed -i "s# /usr/local/share/applications# $DATADIR/applications#g" ./"$arg"
45-
sed -i "s# /usr/share/pixmaps# $DATADIR/icons#g" ./"$arg"
46-
sed -i "s# /usr/local/share/pixmaps# $DATADIR/icons#g" ./"$arg"
4733
}
4834

4935
function _apply_patches() {
5036
if [ "$AMCLI" == appman ] 2>/dev/null; then
5137
_install_common_patch
5238
_install_appman_local_patch
5339
else
54-
if [[ $(grep "[[:space:]]ro[[:space:],]" /proc/mounts) ]]; then
55-
$SUDOCOMMAND mkdir -p /usr/local/share/applications
56-
sed -i 's# /usr/share/applications# /usr/local/share/applications#g' ./"$arg"
57-
sed -i 's# "/usr/share/applications# "/usr/local/share/applications#g' ./"$arg"
58-
fi
5940
_install_common_patch
6041
fi
6142
}
@@ -149,7 +130,7 @@ function _install_arg() {
149130
fi
150131
done
151132
# Check if the installation script contain a keyword related to a missing dependence
152-
if grep -q '.deb' ./"$arg"; then
133+
if grep -q 'ar.*x .*\.deb' ./"$arg"; then
153134
if ! command -v ar 1>/dev/null; then
154135
echo ' 💀 ERROR: YOU CANNOT INSTALL '"$(echo "\"$arg\"" | tr '[:lower:]' '[:upper:]')"' WITHOUT INSTALLING "BINUTILS"!'; return 0
155136
fi
@@ -162,17 +143,17 @@ function _install_arg() {
162143
sed -i 's#firefox --class#'"$(echo "$ffbrowser" | xargs -L 1 basename)"' --class#g' ./"$arg"
163144
fi
164145
fi
165-
if grep -q '.tar' ./"$arg"; then
146+
if grep -q 'http.*\.tar' ./"$arg"; then
166147
if ! command -v tar 1>/dev/null; then
167148
echo ' 💀 ERROR: YOU CANNOT INSTALL '"$(echo "\"$arg\"" | tr '[:lower:]' '[:upper:]')"' WITHOUT INSTALLING "TAR"!'; return 0
168149
fi
169150
fi
170-
if grep -q '.zip' ./"$arg"; then
151+
if grep -q 'http.*\.zip' ./"$arg"; then
171152
if ! command -v unzip 1>/dev/null; then
172153
echo ' 💀 ERROR: YOU CANNOT INSTALL '"$(echo "\"$arg\"" | tr '[:lower:]' '[:upper:]')"' WITHOUT INSTALLING "UNZIP"!'; return 0
173154
fi
174155
fi
175-
if grep -q 'zsync /opt' ./"$arg"; then
156+
if grep -q '^wget "$version.zsync"' ./"$arg"; then
176157
if ! command -v zsync 1>/dev/null; then
177158
optzsync=$(grep -F 'if test -f /opt/$APP/*.zsync' ./"$arg" | wc -l)
178159
if [ "$optzsync" == 0 ]; then

programs/x86_64/appimagehelper

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ chmod a+x ../remove || exit 1
1414
# DOWNLOAD AND PREPARE THE APP, $version is also used for updates
1515
version="https://bin.ceicer.com/appimagehelper/bin/appimagehelper-x86_64.AppImage"
1616
wget "$version" || exit 1
17-
#wget "$version.zsync" 2> /dev/null # Comment out this line if you want to use zsync
17+
wget "$version.zsync" 2> /dev/null # Comment out this line if you want to use zsync
1818
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
1919
cd ..
2020
mv ./tmp/*mage ./"$APP"

programs/x86_64/appimagetool

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ chmod a+x ../remove || exit 1
1414
# DOWNLOAD AND PREPARE THE APP, $version is also used for updates
1515
version=$(curl -Ls https://api.github.com/repos/AppImage/AppImageKit/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | grep -i "x86_64" | head -1)
1616
wget "$version" || exit 1
17-
#wget "$version.zsync" 2> /dev/null # Comment out this line if you want to use zsync
17+
wget "$version.zsync" 2> /dev/null # Comment out this line if you want to use zsync
1818
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
1919
cd ..
2020
mv ./tmp/*mage ./"$APP"

programs/x86_64/appimageupdate

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ printf '\n%s' "rm -f /usr/local/share/applications/$APP-AM.desktop" >> ../remove
1212
chmod a+x ../remove || exit 1
1313

1414
# DOWNLOAD AND PREPARE THE APP, $version is also used for updates
15-
version=$(curl -Ls https://api.github.com/repos/AppImage/AppImageUpdate/releases/latest | sed 's/[()",{} ]/\n/g' | grep -oi "https.*x86_86.*mage$" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | grep -v "tool" | head -1)
15+
version=$(curl -Ls https://api.github.com/repos/AppImage/AppImageUpdate/releases/latest | sed 's/[()",{} ]/\n/g' | grep -oi "https.*appimageupdate-x86_64.*mage$" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | head -1)
1616
wget "$version" || exit 1
17-
#wget "$version.zsync" 2> /dev/null # Comment out this line if you want to use zsync
17+
wget "$version.zsync" 2> /dev/null # Comment out this line if you want to use zsync
1818
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
1919
cd ..
2020
mv ./tmp/*mage ./"$APP"
@@ -33,7 +33,7 @@ set -u
3333
APP=appimageupdate
3434
SITE="AppImage/AppImageUpdate"
3535
version0=$(cat "/opt/$APP/version")
36-
version=$(curl -Ls https://api.github.com/repos/AppImage/AppImageUpdate/releases/latest | sed 's/[()",{} ]/\n/g' | grep -oi "https.*x86_86.*mage$" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | grep -v "tool" | head -1)
36+
version=$(curl -Ls https://api.github.com/repos/AppImage/AppImageUpdate/releases/latest | sed 's/[()",{} ]/\n/g' | grep -oi "https.*appimageupdate-x86_64.*mage$" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | head -1)
3737
[ -n "$version" ] || { echo "Error getting link"; exit 1; }
3838
if [ "$version" != "$version0" ] || [ -e /opt/"$APP"/*.zsync ]; then
3939
mkdir "/opt/$APP/tmp" && cd "/opt/$APP/tmp" || exit 1

programs/x86_64/appimageupdatetool

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ chmod a+x ../remove || exit 1
1414
# DOWNLOAD AND PREPARE THE APP, $version is also used for updates
1515
version=$(curl -Ls https://api.github.com/repos/AppImage/AppImageUpdate/releases/latest | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | grep -i "appimageupdatetool.*x86_64" | head -1)
1616
wget "$version" || exit 1
17-
#wget "$version.zsync" 2> /dev/null # Comment out this line if you want to use zsync
17+
wget "$version.zsync" 2> /dev/null # Comment out this line if you want to use zsync
1818
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
1919
cd ..
2020
mv ./tmp/*mage ./"$APP"

programs/x86_64/ffwa-facebook

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ APP=ffwa-facebook
44
APPNAME="Facebook"
55
ICONURL="https://portable-linux-apps.github.io/icons/$APP.png"
66

7-
# CREATING THE FOLDER
8-
mkdir /opt/$APP
9-
cd /opt/$APP;
7+
# CREATING THE DIRECTORY
8+
mkdir /opt/"$APP"
9+
cd /opt/"$APP"
1010

1111
# ADD THE REMOVER
12-
echo '#!/bin/sh' >> /opt/$APP/remove
13-
echo "rm -R -f /usr/local/share/applications/$APP-AM.desktop /opt/$APP /usr/local/bin/$APP" >> /opt/$APP/remove
12+
echo '#!/bin/sh' >> /opt/"$APP"/remove
13+
echo "rm -R -f /usr/local/share/applications/$APP-AM.desktop /opt/$APP /usr/local/bin/$APP" >> /opt/"$APP"/remove
1414
chmod a+x /opt/"$APP"/remove
1515

1616
# LINK

programs/x86_64/ffwa-github

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ APP=ffwa-github
44
APPNAME="GitHub"
55
ICONURL="https://portable-linux-apps.github.io/icons/$APP.png"
66

7-
# CREATING THE FOLDER
8-
mkdir /opt/$APP
9-
cd /opt/$APP;
7+
# CREATING THE DIRECTORY
8+
mkdir /opt/"$APP"
9+
cd /opt/"$APP"
1010

1111
# ADD THE REMOVER
12-
echo '#!/bin/sh' >> /opt/$APP/remove
13-
echo "rm -R -f /usr/local/share/applications/$APP-AM.desktop /opt/$APP /usr/local/bin/$APP" >> /opt/$APP/remove
12+
echo '#!/bin/sh' >> /opt/"$APP"/remove
13+
echo "rm -R -f /usr/local/share/applications/$APP-AM.desktop /opt/$APP /usr/local/bin/$APP" >> /opt/"$APP"/remove
1414
chmod a+x /opt/"$APP"/remove
1515

1616
# LINK

0 commit comments

Comments
 (0)