Skip to content

Commit 2078165

Browse files
authored
Update 55 apps
1 parent 2cb5d5d commit 2078165

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+3217
-5328
lines changed

programs/x86_64/fontlet

Lines changed: 59 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,114 +1,74 @@
11
#!/bin/sh
22

3+
# AM INSTALL SCRIPT VERSION 3.5
4+
set -u
35
APP=fontlet
4-
REPO="fontlet/fontlet-explorer"
6+
SITE="fontlet/fontlet-explorer"
57

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

10-
# ADD THE REMOVER
11-
echo '#!/bin/sh' >> /opt/$APP/remove
12-
echo "rm -R -f /usr/share/applications/AM-$APP.desktop /opt/$APP /usr/local/bin/$APP" >> /opt/$APP/remove
13-
chmod a+x /opt/$APP/remove
14-
15-
# DOWNLOAD THE ARCHIVE
16-
mkdir tmp
17-
cd ./tmp
18-
19-
version=$(curl -Ls https://api.github.com/repos/$REPO/releases | grep -w -v i386 | grep -w -v i686 | grep -w -v aarch64 | grep -w -v arm64 | grep -w -v armv7l | grep browser_download_url | grep -i appimage | cut -d '"' -f 4 | head -1)
20-
wget $version
21-
echo "$version" >> /opt/$APP/version
14+
# DOWNLOAD AND PREPARE THE APP, $version is also used for updates
15+
version=$(curl -Ls https://api.github.com/repos/fontlet/fontlet-explorer/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -vi "i386|i686|aarch64|arm64|armv7l" | head -1)
16+
wget "$version" || exit 1
17+
#wget "$version.zsync" 2> /dev/null # Comment out this line if you want to use zsync
18+
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
2219
cd ..
23-
mv ./tmp/*mage ./$APP
24-
chmod a+x /opt/$APP/$APP
25-
rmdir ./tmp
20+
mv ./tmp/*mage ./"$APP"
21+
mv ./tmp/*.zsync ./"$APP".zsync 2>/dev/null
22+
rm -R -f ./tmp || exit 1
23+
echo "$version" > ./version
24+
chmod a+x ./"$APP" || exit 1
2625

27-
# LINK
28-
ln -s /opt/$APP/$APP /usr/local/bin/$APP
26+
# LINK TO PATH
27+
ln -s "/opt/$APP/$APP" "/usr/local/bin/$APP"
2928

3029
# SCRIPT TO UPDATE THE PROGRAM
31-
cat >> /opt/$APP/AM-updater << 'EOF'
32-
#!/usr/bin/env bash
30+
cat >> ./AM-updater << 'EOF'
31+
#!/bin/sh
32+
set -u
3333
APP=fontlet
34-
REPO="fontlet/fontlet-explorer"
35-
version0=$(cat /opt/$APP/version)
36-
version=$(curl -Ls https://api.github.com/repos/$REPO/releases | grep -w -v i386 | grep -w -v i686 | grep -w -v aarch64 | grep -w -v arm64 | grep -w -v armv7l | grep browser_download_url | grep -i appimage | cut -d '"' -f 4 | head -1)
37-
if [ $version = $version0 ]; then
38-
echo "Update not needed!"
39-
else
40-
notify-send "A new version of $APP is available, please wait"
41-
mkdir /opt/$APP/tmp
42-
cd /opt/$APP/tmp
43-
wget $version
44-
if ls . | grep mage; then
34+
SITE="fontlet/fontlet-explorer"
35+
version0=$(cat "/opt/$APP/version")
36+
version=$(curl -Ls https://api.github.com/repos/fontlet/fontlet-explorer/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -vi "i386|i686|aarch64|arm64|armv7l" | head -1)
37+
[ -n "$version" ] || { echo "Error getting link"; exit 1; }
38+
if [ "$version" != "$version0" ] || [ -e /opt/"$APP"/*.zsync ]; then
39+
mkdir "/opt/$APP/tmp" && cd "/opt/$APP/tmp" || exit 1
40+
[ -e ../*.zsync ] || notify-send "A new version of $APP is available, please wait"
41+
[ -e ../*.zsync ] && wget "$version.zsync" 2>/dev/null || { wget "$version" || exit 1; }
42+
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
4543
cd ..
46-
if test -f ./tmp/*mage; then rm ./version
47-
fi
48-
echo $version >> ./version
49-
mv --backup=t ./tmp/*mage ./$APP
50-
chmod a+x /opt/$APP/$APP
51-
rm -R -f ./tmp ./*~
52-
fi
53-
notify-send "$APP is updated!"
44+
mv ./tmp/*.zsync ./"$APP".zsync 2>/dev/null || mv --backup=t ./tmp/*mage ./"$APP"
45+
[ -e ./*.zsync ] && { zsync ./"$APP".zsync || notify-send -u critical "zsync failed to update $APP"; }
46+
chmod a+x ./"$APP" || exit 1
47+
echo "$version" > ./version
48+
rm -R -f ./*zs-old ./*.part ./tmp ./*~
49+
notify-send "$APP is updated!"
50+
else
51+
echo "Update not needed!"
5452
fi
5553
EOF
56-
chmod a+x /opt/$APP/AM-updater
54+
chmod a+x ./AM-updater || exit 1
5755

5856
# LAUNCHER & ICON
59-
app=$(echo $APP | cut -c -3)
60-
cd /opt/$APP
61-
./$APP --appimage-extract *.desktop 1>/dev/null
62-
./$APP --appimage-extract share/applications/*.desktop 1>/dev/null
63-
./$APP --appimage-extract usr/share/applications/*.desktop 1>/dev/null
64-
mv squashfs-root/*.desktop ./$APP.desktop
65-
mv squashfs-root/share/applications/*.desktop ./$APP.desktop
66-
mv squashfs-root/usr/share/applications/*.desktop ./$APP.desktop
67-
if [ ! -e ./$APP.desktop ]; then
68-
rm ./$APP.desktop; ./$APP --appimage-extract usr/share/applications/*$app*.desktop
69-
mv squashfs-root/usr/share/applications/*.desktop ./$APP.desktop
70-
fi
71-
if [ ! -e ./$APP.desktop ]; then
72-
rm ./$APP.desktop; ./$APP --appimage-extract share/applications/*$app*.desktop 1>/dev/null
73-
mv squashfs-root/share/applications/*.desktop ./$APP.desktop
74-
fi
75-
CHANGEEXEC=$(cat ./$APP.desktop | grep Exec= | tr ' ' '\n' | tr '=' '\n' | tr '/' '\n' | grep $app | head -1)
76-
sed -i "s#$CHANGEEXEC#$APP#g" ./$APP.desktop
77-
sed -i "s#AppRun#$APP#g" ./$APP.desktop
78-
sed -i "s#Exec=/bin/#Exec=#g" ./$APP.desktop
79-
sed -i "s#Exec=/usr/bin/#Exec=#g" ./$APP.desktop
80-
CHANGEICON=$(cat ./$APP.desktop | grep Icon= | head -1)
81-
sed -i "s#$CHANGEICON#Icon=/opt/$APP/icons/$APP#g" ./$APP.desktop
82-
83-
mkdir icons
84-
./$APP --appimage-extract *.png 2>&1 | grep -v "squashfs-root"; mv ./squashfs-root/*$app* ./icons/$APP 2>/dev/null
85-
./$APP --appimage-extract *.svg 2>&1 | grep -v "squashfs-root"; mv ./squashfs-root/*$app* ./icons/$APP 2>/dev/null
86-
./$APP --appimage-extract share/icons/*/*/* 1>/dev/null
87-
./$APP --appimage-extract usr/share/icons/*/*/* 1>/dev/null
88-
./$APP --appimage-extract share/icons/*/*/*/* 1>/dev/null
89-
./$APP --appimage-extract usr/share/icons/*/*/*/* 1>/dev/null
90-
mv ./squashfs-root/share/icons/hicolor/22x22/apps/*$app* ./icons/$APP 2>/dev/null
91-
mv ./squashfs-root/share/icons/hicolor/24x24/apps/*$app* ./icons/$APP 2>/dev/null
92-
mv ./squashfs-root/share/icons/hicolor/32x32/apps/*$app* ./icons/$APP 2>/dev/null
93-
mv ./squashfs-root/share/icons/hicolor/48x48/apps/*$app* ./icons/$APP 2>/dev/null
94-
mv ./squashfs-root/share/icons/hicolor/64x64/apps/*$app* ./icons/$APP 2>/dev/null
95-
mv ./squashfs-root/share/icons/hicolor/128x128/apps/*$app* ./icons/$APP 2>/dev/null
96-
mv ./squashfs-root/share/icons/hicolor/256x256/apps/*$app* ./icons/$APP 2>/dev/null
97-
mv ./squashfs-root/share/icons/hicolor/512x512/apps/*$app* ./icons/$APP 2>/dev/null
98-
mv ./squashfs-root/share/icons/hicolor/scalable/apps/*$app* ./icons/$APP 2>/dev/null
99-
mv ./squashfs-root/usr/share/icons/hicolor/22x22/apps/*$app* ./icons/$APP 2>/dev/null
100-
mv ./squashfs-root/usr/share/icons/hicolor/24x24/apps/*$app* ./icons/$APP 2>/dev/null
101-
mv ./squashfs-root/usr/share/icons/hicolor/32x32/apps/*$app* ./icons/$APP 2>/dev/null
102-
mv ./squashfs-root/usr/share/icons/hicolor/48x48/apps/*$app* ./icons/$APP 2>/dev/null
103-
mv ./squashfs-root/usr/share/icons/hicolor/64x64/apps/*$app* ./icons/$APP 2>/dev/null
104-
mv ./squashfs-root/usr/share/icons/hicolor/128x128/apps/*$app* ./icons/$APP 2>/dev/null
105-
mv ./squashfs-root/usr/share/icons/hicolor/256x256/apps/*$app* ./icons/$APP 2>/dev/null
106-
mv ./squashfs-root/usr/share/icons/hicolor/512x512/apps/*$app* ./icons/$APP 2>/dev/null
107-
mv ./squashfs-root/usr/share/icons/hicolor/scalable/apps/*$app* ./icons/$APP 2>/dev/null
108-
109-
rm -R -f /opt/$APP/squashfs-root
110-
mv ./$APP.desktop /usr/share/applications/AM-$APP.desktop
111-
112-
113-
114-
57+
./"$APP" --appimage-extract *.desktop 1>/dev/null && mv ./squashfs-root/*.desktop ./"$APP".desktop
58+
./"$APP" --appimage-extract .DirIcon 1>/dev/null && mv ./squashfs-root/.DirIcon ./DirIcon
59+
COUNT=0
60+
while [ "$COUNT" -lt 10 ]; do # Tries to get the actual icon/desktop if it is a symlink to another symlink
61+
if [ -L ./"$APP".desktop ]; then
62+
LINKPATH="$(readlink ./"$APP".desktop | sed 's|^\./||' 2>/dev/null)"
63+
./"$APP" --appimage-extract "$LINKPATH" 1>/dev/null && mv ./squashfs-root/"$LINKPATH" ./"$APP".desktop
64+
fi
65+
if [ -L ./DirIcon ]; then
66+
LINKPATH="$(readlink ./DirIcon | sed 's|^\./||' 2>/dev/null)"
67+
./"$APP" --appimage-extract "$LINKPATH" 1>/dev/null && mv ./squashfs-root/"$LINKPATH" ./DirIcon
68+
fi
69+
[ ! -L ./"$APP".desktop ] && [ ! -L ./DirIcon ] && break
70+
COUNT=$((COUNT + 1))
71+
done
72+
sed -i "s#Exec=[^ ]*#Exec=$APP#g; s#Icon=.*#Icon=/opt/$APP/icons/$APP#g" ./"$APP".desktop
73+
mv ./"$APP".desktop /usr/local/share/applications/"$APP"-AM.desktop && mv ./DirIcon ./icons/"$APP" 1>/dev/null
74+
rm -R -f ./squashfs-root

programs/x86_64/foobar2000

Lines changed: 59 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,114 +1,74 @@
11
#!/bin/sh
22

3+
# AM INSTALL SCRIPT VERSION 3.5
4+
set -u
35
APP=foobar2000
4-
REPO="mmtrt/foobar2000_AppImage"
6+
SITE="mmtrt/foobar2000_AppImage"
57

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

10-
# ADD THE REMOVER
11-
echo '#!/bin/sh' >> /opt/$APP/remove
12-
echo "rm -R -f /usr/share/applications/AM-$APP.desktop /opt/$APP /usr/local/bin/$APP" >> /opt/$APP/remove
13-
chmod a+x /opt/$APP/remove
14-
15-
# DOWNLOAD THE ARCHIVE
16-
mkdir tmp
17-
cd ./tmp
18-
19-
version=$(curl -Ls https://api.github.com/repos/$REPO/releases | grep -w -v i386 | grep -w -v i686 | grep -w -v aarch64 | grep -w -v arm64 | grep -w -v armv7l | grep browser_download_url | grep -i appimage | cut -d '"' -f 4 | head -1)
20-
wget $version
21-
echo "$version" >> /opt/$APP/version
14+
# DOWNLOAD AND PREPARE THE APP, $version is also used for updates
15+
version=$(curl -Ls https://api.github.com/repos/mmtrt/foobar2000_AppImage/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -vi "i386|i686|aarch64|arm64|armv7l" | head -1)
16+
wget "$version" || exit 1
17+
#wget "$version.zsync" 2> /dev/null # Comment out this line if you want to use zsync
18+
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
2219
cd ..
23-
mv ./tmp/*mage ./$APP
24-
chmod a+x /opt/$APP/$APP
25-
rmdir ./tmp
20+
mv ./tmp/*mage ./"$APP"
21+
mv ./tmp/*.zsync ./"$APP".zsync 2>/dev/null
22+
rm -R -f ./tmp || exit 1
23+
echo "$version" > ./version
24+
chmod a+x ./"$APP" || exit 1
2625

27-
# LINK
28-
ln -s /opt/$APP/$APP /usr/local/bin/$APP
26+
# LINK TO PATH
27+
ln -s "/opt/$APP/$APP" "/usr/local/bin/$APP"
2928

3029
# SCRIPT TO UPDATE THE PROGRAM
31-
cat >> /opt/$APP/AM-updater << 'EOF'
32-
#!/usr/bin/env bash
30+
cat >> ./AM-updater << 'EOF'
31+
#!/bin/sh
32+
set -u
3333
APP=foobar2000
34-
REPO="mmtrt/foobar2000_AppImage"
35-
version0=$(cat /opt/$APP/version)
36-
version=$(curl -Ls https://api.github.com/repos/$REPO/releases | grep -w -v i386 | grep -w -v i686 | grep -w -v aarch64 | grep -w -v arm64 | grep -w -v armv7l | grep browser_download_url | grep -i appimage | cut -d '"' -f 4 | head -1)
37-
if [ $version = $version0 ]; then
38-
echo "Update not needed!"
39-
else
40-
notify-send "A new version of $APP is available, please wait"
41-
mkdir /opt/$APP/tmp
42-
cd /opt/$APP/tmp
43-
wget $version
44-
if ls . | grep mage; then
34+
SITE="mmtrt/foobar2000_AppImage"
35+
version0=$(cat "/opt/$APP/version")
36+
version=$(curl -Ls https://api.github.com/repos/mmtrt/foobar2000_AppImage/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -vi "i386|i686|aarch64|arm64|armv7l" | head -1)
37+
[ -n "$version" ] || { echo "Error getting link"; exit 1; }
38+
if [ "$version" != "$version0" ] || [ -e /opt/"$APP"/*.zsync ]; then
39+
mkdir "/opt/$APP/tmp" && cd "/opt/$APP/tmp" || exit 1
40+
[ -e ../*.zsync ] || notify-send "A new version of $APP is available, please wait"
41+
[ -e ../*.zsync ] && wget "$version.zsync" 2>/dev/null || { wget "$version" || exit 1; }
42+
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
4543
cd ..
46-
if test -f ./tmp/*mage; then rm ./version
47-
fi
48-
echo $version >> ./version
49-
mv --backup=t ./tmp/*mage ./$APP
50-
chmod a+x /opt/$APP/$APP
51-
rm -R -f ./tmp ./*~
52-
fi
53-
notify-send "$APP is updated!"
44+
mv ./tmp/*.zsync ./"$APP".zsync 2>/dev/null || mv --backup=t ./tmp/*mage ./"$APP"
45+
[ -e ./*.zsync ] && { zsync ./"$APP".zsync || notify-send -u critical "zsync failed to update $APP"; }
46+
chmod a+x ./"$APP" || exit 1
47+
echo "$version" > ./version
48+
rm -R -f ./*zs-old ./*.part ./tmp ./*~
49+
notify-send "$APP is updated!"
50+
else
51+
echo "Update not needed!"
5452
fi
5553
EOF
56-
chmod a+x /opt/$APP/AM-updater
54+
chmod a+x ./AM-updater || exit 1
5755

5856
# LAUNCHER & ICON
59-
app=$(echo $APP | cut -c -3)
60-
cd /opt/$APP
61-
./$APP --appimage-extract *.desktop 1>/dev/null
62-
./$APP --appimage-extract share/applications/*.desktop 1>/dev/null
63-
./$APP --appimage-extract usr/share/applications/*.desktop 1>/dev/null
64-
mv squashfs-root/*.desktop ./$APP.desktop
65-
mv squashfs-root/share/applications/*.desktop ./$APP.desktop
66-
mv squashfs-root/usr/share/applications/*.desktop ./$APP.desktop
67-
if [ ! -e ./$APP.desktop ]; then
68-
rm ./$APP.desktop; ./$APP --appimage-extract usr/share/applications/*$app*.desktop
69-
mv squashfs-root/usr/share/applications/*.desktop ./$APP.desktop
70-
fi
71-
if [ ! -e ./$APP.desktop ]; then
72-
rm ./$APP.desktop; ./$APP --appimage-extract share/applications/*$app*.desktop 1>/dev/null
73-
mv squashfs-root/share/applications/*.desktop ./$APP.desktop
74-
fi
75-
CHANGEEXEC=$(cat ./$APP.desktop | grep Exec= | tr ' ' '\n' | tr '=' '\n' | tr '/' '\n' | grep $app | head -1)
76-
sed -i "s#$CHANGEEXEC#$APP#g" ./$APP.desktop
77-
sed -i "s#AppRun#$APP#g" ./$APP.desktop
78-
sed -i "s#Exec=/bin/#Exec=#g" ./$APP.desktop
79-
sed -i "s#Exec=/usr/bin/#Exec=#g" ./$APP.desktop
80-
CHANGEICON=$(cat ./$APP.desktop | grep Icon= | head -1)
81-
sed -i "s#$CHANGEICON#Icon=/opt/$APP/icons/$APP#g" ./$APP.desktop
82-
83-
mkdir icons
84-
./$APP --appimage-extract *.png 2>&1 | grep -v "squashfs-root"; mv ./squashfs-root/*$app* ./icons/$APP 2>/dev/null
85-
./$APP --appimage-extract *.svg 2>&1 | grep -v "squashfs-root"; mv ./squashfs-root/*$app* ./icons/$APP 2>/dev/null
86-
./$APP --appimage-extract share/icons/*/*/* 1>/dev/null
87-
./$APP --appimage-extract usr/share/icons/*/*/* 1>/dev/null
88-
./$APP --appimage-extract share/icons/*/*/*/* 1>/dev/null
89-
./$APP --appimage-extract usr/share/icons/*/*/*/* 1>/dev/null
90-
mv ./squashfs-root/share/icons/hicolor/22x22/apps/*$app* ./icons/$APP 2>/dev/null
91-
mv ./squashfs-root/share/icons/hicolor/24x24/apps/*$app* ./icons/$APP 2>/dev/null
92-
mv ./squashfs-root/share/icons/hicolor/32x32/apps/*$app* ./icons/$APP 2>/dev/null
93-
mv ./squashfs-root/share/icons/hicolor/48x48/apps/*$app* ./icons/$APP 2>/dev/null
94-
mv ./squashfs-root/share/icons/hicolor/64x64/apps/*$app* ./icons/$APP 2>/dev/null
95-
mv ./squashfs-root/share/icons/hicolor/128x128/apps/*$app* ./icons/$APP 2>/dev/null
96-
mv ./squashfs-root/share/icons/hicolor/256x256/apps/*$app* ./icons/$APP 2>/dev/null
97-
mv ./squashfs-root/share/icons/hicolor/512x512/apps/*$app* ./icons/$APP 2>/dev/null
98-
mv ./squashfs-root/share/icons/hicolor/scalable/apps/*$app* ./icons/$APP 2>/dev/null
99-
mv ./squashfs-root/usr/share/icons/hicolor/22x22/apps/*$app* ./icons/$APP 2>/dev/null
100-
mv ./squashfs-root/usr/share/icons/hicolor/24x24/apps/*$app* ./icons/$APP 2>/dev/null
101-
mv ./squashfs-root/usr/share/icons/hicolor/32x32/apps/*$app* ./icons/$APP 2>/dev/null
102-
mv ./squashfs-root/usr/share/icons/hicolor/48x48/apps/*$app* ./icons/$APP 2>/dev/null
103-
mv ./squashfs-root/usr/share/icons/hicolor/64x64/apps/*$app* ./icons/$APP 2>/dev/null
104-
mv ./squashfs-root/usr/share/icons/hicolor/128x128/apps/*$app* ./icons/$APP 2>/dev/null
105-
mv ./squashfs-root/usr/share/icons/hicolor/256x256/apps/*$app* ./icons/$APP 2>/dev/null
106-
mv ./squashfs-root/usr/share/icons/hicolor/512x512/apps/*$app* ./icons/$APP 2>/dev/null
107-
mv ./squashfs-root/usr/share/icons/hicolor/scalable/apps/*$app* ./icons/$APP 2>/dev/null
108-
109-
rm -R -f /opt/$APP/squashfs-root
110-
mv ./$APP.desktop /usr/share/applications/AM-$APP.desktop
111-
112-
113-
114-
57+
./"$APP" --appimage-extract *.desktop 1>/dev/null && mv ./squashfs-root/*.desktop ./"$APP".desktop
58+
./"$APP" --appimage-extract .DirIcon 1>/dev/null && mv ./squashfs-root/.DirIcon ./DirIcon
59+
COUNT=0
60+
while [ "$COUNT" -lt 10 ]; do # Tries to get the actual icon/desktop if it is a symlink to another symlink
61+
if [ -L ./"$APP".desktop ]; then
62+
LINKPATH="$(readlink ./"$APP".desktop | sed 's|^\./||' 2>/dev/null)"
63+
./"$APP" --appimage-extract "$LINKPATH" 1>/dev/null && mv ./squashfs-root/"$LINKPATH" ./"$APP".desktop
64+
fi
65+
if [ -L ./DirIcon ]; then
66+
LINKPATH="$(readlink ./DirIcon | sed 's|^\./||' 2>/dev/null)"
67+
./"$APP" --appimage-extract "$LINKPATH" 1>/dev/null && mv ./squashfs-root/"$LINKPATH" ./DirIcon
68+
fi
69+
[ ! -L ./"$APP".desktop ] && [ ! -L ./DirIcon ] && break
70+
COUNT=$((COUNT + 1))
71+
done
72+
sed -i "s#Exec=[^ ]*#Exec=$APP#g; s#Icon=.*#Icon=/opt/$APP/icons/$APP#g" ./"$APP".desktop
73+
mv ./"$APP".desktop /usr/local/share/applications/"$APP"-AM.desktop && mv ./DirIcon ./icons/"$APP" 1>/dev/null
74+
rm -R -f ./squashfs-root

0 commit comments

Comments
 (0)