Skip to content

Commit

Permalink
Update to release-1.0.14
Browse files Browse the repository at this point in the history
  • Loading branch information
electrikjesus committed Apr 17, 2022
1 parent 9c831db commit a2beb6c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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

Expand Down
16 changes: 13 additions & 3 deletions wpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit a2beb6c

Please sign in to comment.