Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-hc authored Jan 14, 2025
1 parent ed0f9ea commit 7f97877
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
6 changes: 3 additions & 3 deletions programs/x86_64/anything-llm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ 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/Mintplex-Labs/anything-llm/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | head -1)
version=$(curl -Ls https://api.github.com/repos/Mintplex-Labs/anything-llm/releases | sed 's/[()",{} ]/\n/g' | grep -i tag | head -1 | sed 's:.*/::')
wget "$(curl -Ls https://raw.githubusercontent.com/Mintplex-Labs/anything-llm/desktop/linux_installer.sh | tr '"' '\n' | grep -i "^http.*appimage$" | head -1)" || 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.
Expand All @@ -33,7 +33,7 @@ set -u
APP=anything-llm
SITE="Mintplex-Labs/anything-llm"
version0=$(cat "/opt/$APP/version")
version=$(curl -Ls https://api.github.com/repos/Mintplex-Labs/anything-llm/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | head -1)
version=$(curl -Ls https://api.github.com/repos/Mintplex-Labs/anything-llm/releases | sed 's/[()",{} ]/\n/g' | grep -i tag | head -1 | sed 's:.*/::')
[ -n "$version" ] || { echo "Error getting link"; exit 1; }
if command -v appimageupdatetool >/dev/null 2>&1; then
cd "/opt/$APP" || exit 1
Expand All @@ -57,7 +57,7 @@ EOF
chmod a+x ./AM-updater || exit 1

# LAUNCHER & ICON
./"$APP" --appimage-extract *.desktop 1>/dev/null && mv ./squashfs-root/*.desktop ./"$APP".desktop
./"$APP" --appimage-extract *.desktop 1>/dev/null && mv ./squashfs-root/*desktop.desktop ./"$APP".desktop
./"$APP" --appimage-extract .DirIcon 1>/dev/null && mv ./squashfs-root/.DirIcon ./DirIcon
COUNT=0
while [ "$COUNT" -lt 10 ]; do # Tries to get the actual icon/desktop if it is a symlink to another symlink
Expand Down
27 changes: 15 additions & 12 deletions programs/x86_64/oh-mymd
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/sh
# spooky

# AM INSTALL SCRIPT VERSION 3.5
set -u
APP=oh-mymd
SITE="https://www.ohmymd.app"
SITE="virtua1thread/support.ohmymd.app"

# CREATE DIRECTORIES AND ADD REMOVER
[ -n "$APP" ] && mkdir -p "/opt/$APP/tmp" "/opt/$APP/icons" && cd "/opt/$APP/tmp" || exit 1
Expand All @@ -12,13 +12,13 @@ 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=$(echo "https://oss.ohmymd.milchstrabe.com/patch/linux/appimages/Oh%20Mymd-$(wget -q https://repology.org/project/ohmymd/versions -O - | grep -i "AUR" | head -4 | grep -o -P '(?<=">).*(?=</a)' | sed 's/^.*>//' | tail -1).AppImage")
version=$(curl -Ls https://api.github.com/repos/virtua1thread/support.ohmymd.app/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | head -1)
wget "$version" || exit 1
#wget "$version.zsync" 2> /dev/null # Comment out this line if you want to use zsync
# 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"
mv ./tmp/*.zsync ./"$APP".zsync 2>/dev/null
# Keep this space in sync with other installation scripts
rm -R -f ./tmp || exit 1
echo "$version" > ./version
chmod a+x ./"$APP" || exit 1
Expand All @@ -31,18 +31,21 @@ cat >> ./AM-updater << 'EOF'
#!/bin/sh
set -u
APP=oh-mymd
SITE="https://www.ohmymd.app"
SITE="virtua1thread/support.ohmymd.app"
version0=$(cat "/opt/$APP/version")
version=$(echo "https://oss.ohmymd.milchstrabe.com/patch/linux/appimages/Oh%20Mymd-$(wget -q https://repology.org/project/ohmymd/versions -O - | grep -i "AUR" | head -4 | grep -o -P '(?<=">).*(?=</a)' | sed 's/^.*>//' | tail -1).AppImage")
version=$(curl -Ls https://api.github.com/repos/virtua1thread/support.ohmymd.app/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | head -1)
[ -n "$version" ] || { echo "Error getting link"; exit 1; }
if [ "$version" != "$version0" ] || [ -e /opt/"$APP"/*.zsync ]; then
if command -v appimageupdatetool >/dev/null 2>&1; then
cd "/opt/$APP" || exit 1
appimageupdatetool -Or ./"$APP" && chmod a+x ./"$APP" && echo "$version" > ./version && exit 0
fi
if [ "$version" != "$version0" ]; then
mkdir "/opt/$APP/tmp" && cd "/opt/$APP/tmp" || exit 1
[ -e ../*.zsync ] || notify-send "A new version of $APP is available, please wait"
[ -e ../*.zsync ] && wget "$version.zsync" 2>/dev/null || { wget "$version" || exit 1; }
notify-send "A new version of $APP is available, please wait"
wget "$version" || exit 1
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
cd ..
mv ./tmp/*.zsync ./"$APP".zsync 2>/dev/null || mv --backup=t ./tmp/*mage ./"$APP"
[ -e ./*.zsync ] && { zsync ./"$APP".zsync || notify-send -u critical "zsync failed to update $APP"; }
mv --backup=t ./tmp/*mage ./"$APP"
chmod a+x ./"$APP" || exit 1
echo "$version" > ./version
rm -R -f ./*zs-old ./*.part ./tmp ./*~
Expand Down
4 changes: 2 additions & 2 deletions programs/x86_64/sunny
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ 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/XMuli/SunnyPages/releases/latest | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | head -1)
version=$(curl -Ls https://api.github.com/repos/XMuli/SunnyPages/releases | 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.
Expand All @@ -33,7 +33,7 @@ set -u
APP=sunny
SITE="XMuli/SunnyPages"
version0=$(cat "/opt/$APP/version")
version=$(curl -Ls https://api.github.com/repos/XMuli/SunnyPages/releases/latest | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | head -1)
version=$(curl -Ls https://api.github.com/repos/XMuli/SunnyPages/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | head -1)
[ -n "$version" ] || { echo "Error getting link"; exit 1; }
if command -v appimageupdatetool >/dev/null 2>&1; then
cd "/opt/$APP" || exit 1
Expand Down

0 comments on commit 7f97877

Please sign in to comment.