Skip to content

Commit fe99c38

Browse files
authored
Update am2pla-site
1 parent 49531a7 commit fe99c38

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

am2pla-site

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ AMREPO="https://raw.githubusercontent.com/ivan-hc/AM/main"
88
arch="x86_64"
99

1010
# ENTER THE DESKTOP DIRECTORY
11-
#cd "$(xdg-user-dir DESKTOP)" || exit 1
11+
cd "$(xdg-user-dir DESKTOP)" || exit 1
1212

1313
# GET THE NAMES OF ALL APPLICATION
1414
if [ -f "$HOME"/.local/share/AM/"$arch"-apps ]; then
1515
cp "$HOME"/.local/share/AM/"$arch"-apps "$arch"-apps && echo -e "$(cat ./"$arch"-apps | awk -v FS="(◆ | : )" '{print $2}')" >> args
16+
elif [ -f ./"$arch"-apps ]; then
17+
echo -e "$(cat ./"$arch"-apps | awk -v FS="(◆ | : )" '{print $2}')" >> args
1618
else
1719
curl -Ls "$AMREPO"/programs/"$arch"-apps > "$arch"-apps && echo -e "$(cat ./"$arch"-apps | awk -v FS="(◆ | : )" '{print $2}')" >> args
1820
fi
@@ -189,7 +191,13 @@ _footer_apps >> apps.md
189191
########################
190192

191193
function _appimages_listing() {
192-
APPIMAGES_LIST_AM=$(curl -Ls https://raw.githubusercontent.com/ivan-hc/AM/main/programs/x86_64-appimages)
194+
if [ -f "$HOME"/.local/share/AM/"$arch"-apps ]; then
195+
APPIMAGES_LIST_AM=$(cat "$HOME"/.local/share/AM/"$arch"-appimages | awk -v FS="(◆ | : )" '{print $2}')
196+
elif [ -f ./"$arch"-apps ]; then
197+
APPIMAGES_LIST_AM=$(cat ./"$arch"-appimages | awk -v FS="(◆ | : )" '{print $2}')
198+
else
199+
APPIMAGES_LIST_AM=$(curl -Ls https://raw.githubusercontent.com/ivan-hc/AM/main/programs/x86_64-appimages)
200+
fi
193201
[ -z "$APPIMAGES_LIST_AM" ] && exit 1
194202
echo "$APPIMAGES_LIST_AM" | awk -v FS="(◆ | : )" '{print $2}' > args
195203
ARGS=$(cat ./args)

0 commit comments

Comments
 (0)