Skip to content

Commit

Permalink
"AM" 9.1.3, full support for AppBundleHUB (#1160)
Browse files Browse the repository at this point in the history
* Change variables for columns to detect in "awk"

* Set variables and functions for AppBundleHUB

* Support AppBundleHUB as a separated repo, near Toolpacks

* Option -f, add AppBundleHUB support

* Simplify option -q

* Option -l, flag --toolpacks lists both Toolpacks and AppBundleHUB's

* Use one function to sync third-party lists

* Inclusivity

* Update install.am

...fix installation from generic third-party repositories

* Option -a, more modular and revised

* Update APP-MANAGER

* Update database.am

...fix to recognize the difference between AppImages installed with a different name

* Update database.am

...remove duplicated code

* Fix description in third party databases

* Option -a, detect real package name for not installed AppBundles

* Option -q, include AppBundles in normal query

* Option -f, determine file type "dwarfs-appbundle"

* Update database.am

...additional condition to check installed AppBundles
  • Loading branch information
ivan-hc authored Nov 27, 2024
1 parent f34e0ce commit c86b2e4
Show file tree
Hide file tree
Showing 3 changed files with 171 additions and 124 deletions.
25 changes: 20 additions & 5 deletions APP-MANAGER
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

AMVERSION="9.1.2-1"
AMVERSION="9.1.3"

# Determine main repository and branch
AMREPO="https://raw.githubusercontent.com/ivan-hc/AM/main"
Expand Down Expand Up @@ -360,10 +360,14 @@ function _am_newrepo_check() {

_am_newrepo_check "$@"

# 3RD PARTY SOURCES -- TOOLPACK
# 3RD PARTY SOURCES
appbundle_repo="https://github.com/xplshn/AppBundleHUB"
appbundle_readme="https://raw.githubusercontent.com/xplshn/dbin-metadata/refs/heads/master/misc/cmd/AM-support/AM.txt"

toolpack_repo="https://github.com/Azathothas/Toolpacks"
toolpack_readme="https://bin.pkgforge.dev/${ARCH}/AM.txt"
export toolpack_name="1" toolpack_description="2" toolpack_site="3" toolpack_dl="4" toolpack_ver="5"

export awk_name="1" awk_description="2" awk_site="3" awk_dl="4" awk_ver="5" # Numbers to use in "awk" to determine columns

################################################################################
# UTILITIES
Expand All @@ -380,6 +384,7 @@ function _completion_lists() {
# Remove existing lists and download new ones
curl -Ls "$APPSLISTDB" > "$AMDATADIR/$arch-apps"
awk -v FS="(◆ | : )" '{print $2}' <"$AMDATADIR"/"$arch"-apps > "$AMDATADIR"/list
[ -f "$AMDATADIR"/"$ARCH"-appbundle ] && awk '{print $2}' "$AMDATADIR"/"$ARCH"-appbundle >> "$AMDATADIR"/list
[ -f "$AMDATADIR"/"$ARCH"-toolpack ] && awk '{print $2}' "$AMDATADIR"/"$ARCH"-toolpack | sed -e 's/$/.toolpack/' >> "$AMDATADIR"/list
# Append options to the list
for o in $available_options; do
Expand Down Expand Up @@ -720,15 +725,25 @@ function _sync_appimages_list() {
fi
}

function _sync_appbundle_list() {
rm -f "$AMDATADIR/$ARCH-appbundle"
curl -Ls "$appbundle_readme" | grep -v "\.appimage \|?" | grep "\.appbundle " | cut -d":" -f1 | cut -d"@" -f2 | sed 's/^| /◆ /g; s/ https$//g; s/ :$//g; s/ | / : /g; s/ |$/./g; s/\.\.$/./g;' | sort > "$AMDATADIR/$ARCH-appbundle"
}

function _sync_toolpacks_list() {
rm -f "$AMDATADIR/$ARCH-toolpack"
curl -Ls "$toolpack_readme" | grep -v "\.appimage \|?" | cut -d":" -f1 | cut -d"@" -f2 | sed 's/^| /◆ /g; s/ | https$/. To install it use the "--toolpack" flag./g; s/ | / : /g' > "$AMDATADIR/$ARCH-toolpack"
curl -Ls "$toolpack_readme" | grep -v "\.appimage \|.appbundle \|?" | cut -d":" -f1 | cut -d"@" -f2 | sed 's/^| /◆ /g; s/ | https$/. To install it use the "--toolpack" flag./g; s/ | / : /g' | sort > "$AMDATADIR/$ARCH-toolpack"
}

function _sync_third_party_lists() {
_sync_appbundle_list
_sync_toolpacks_list
}

function _sync_databases() {
echo -e "$DIVIDING_LINE\n Check and update offline lists of additional databases..."
_sync_appimages_list
_sync_toolpacks_list
_sync_third_party_lists
_completion_lists
}

Expand Down
Loading

0 comments on commit c86b2e4

Please sign in to comment.