From a2beb6c3c51a98d463396c1b663102abdbea9620 Mon Sep 17 00:00:00 2001 From: Jon West Date: Sun, 17 Apr 2022 17:16:44 -0400 Subject: [PATCH] Update to release-1.0.14 --- README.md | 4 ++-- wpm.sh | 16 +++++++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 964830f..3c35195 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Waydroid Package Manager -Version 1.0.1 +Version 1.0.14 Easy to use interface for managing (install/remove) Android apps into [Waydroid](https://waydro.id) and managing (add/remove/update) repos as well This script is provided as a convenience and is not intended to be used as an enterprise solution. @@ -23,7 +23,7 @@ First, clone this repo: Then you can install it like so: sudo chmod +x wpm.sh - cp wpm.sh ~/.local/bin/wpm && cp -r repos/ ~/.local/share/wpm/ + mkdir -p ~/.local/share/wpm && cp wpm.sh ~/.local/bin/wpm && mkdir -p ~/.local/share/wpm/repos && cp -r repos/* ~/.local/share/wpm/repos ## Usage diff --git a/wpm.sh b/wpm.sh index 2a0c674..e34ac4a 100755 --- a/wpm.sh +++ b/wpm.sh @@ -17,7 +17,7 @@ REPOSFOLDER="$SHARED_DIR/repos" RED='\033[0;31m' GREEN='\033[0;32m' YELLOW='\033[0;33m' -LT_BLUE='\033[0;34m' +LT_BLUE='\033[0;94m' NC='\033[0m' # No Color @@ -113,9 +113,19 @@ searchRepo() { fi marketvercode="$(xmlstarlet sel -t -m '//application[id="'"$package"'"]' -v ./nativecode "$repo_dir"/index.xml || true)" apk="$(xmlstarlet sel -t -m '//application[id="'"$package"'"]/package[versioncode="'"$marketvercode"'"]' -v ./apkname "$repo_dir"/index.xml || xmlstarlet sel -t -m '//application[id="'"$package"'"]/package[1]' -v ./apkname "$repo_dir"/index.xml)" + size="$(xmlstarlet sel -t -m '//application[id="'"$package"'"]/package[versioncode="'"$marketvercode"'"]' -v ./size "$repo_dir"/index.xml || xmlstarlet sel -t -m '//application[id="'"$package"'"]/package[1]' -v ./size "$repo_dir"/index.xml)" + version="$(xmlstarlet sel -t -m '//application[id="'"$package"'"]/package[versioncode="'"$marketvercode"'"]' -v ./version "$repo_dir"/index.xml || xmlstarlet sel -t -m '//application[id="'"$package"'"]/package[1]' -v ./version "$repo_dir"/index.xml)" + sdk="$(xmlstarlet sel -t -m '//application[id="'"$package"'"]/package[versioncode="'"$marketvercode"'"]' -v ./sdkver "$repo_dir"/index.xml || xmlstarlet sel -t -m '//application[id="'"$package"'"]/package[1]' -v ./sdkver "$repo_dir"/index.xml)" + targetsdk="$(xmlstarlet sel -t -m '//application[id="'"$package"'"]/package[versioncode="'"$marketvercode"'"]' -v ./targetSdkVersion "$repo_dir"/index.xml || xmlstarlet sel -t -m '//application[id="'"$package"'"]/package[1]' -v ./targetSdkVersion "$repo_dir"/index.xml)" if [ "$apk" != "" ]; then - echo "Found in repo: $repo" - echo "Package: $apk" + echo "" + echo -e "${GREEN}Found in repo: ${NC}$repo" + echo -e "Package: ${LT_BLUE}$apk${NC}" + echo "Size: $size" + echo "Version: $version" + echo "SDK: $sdk" + echo "TargetSDK: $targetsdk" + echo "" return 0 else # echo "$3 Not in repo: $repo"