Skip to content

Commit

Permalink
add manual processing
Browse files Browse the repository at this point in the history
  • Loading branch information
Lifeismana committed Nov 16, 2024
1 parent f943596 commit 4321614
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*.ttf
node_modules/
.venv/
.storage/
index.android.bundle
*.xsd
*.tflite
Expand Down
20 changes: 19 additions & 1 deletion script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ DownloadAPK()
if [[ -f $1/$1.xapk ]]; then
unzip -o $1/$1.xapk -d $1
fi
elif [[ "$SOURCE" == "manual"]]; then
cp $2 $1/$1.apk
else
echo "Unknown source"
exit 1
Expand Down Expand Up @@ -133,7 +135,23 @@ ProcessApp()
fi
}

if [[ -n "$APP_TO_PROCESS" ]]; then
if [[ "$SOURCE" == "manual" ]]; then
for APP in "./.storage/*";
do
# untested, future-proofing
if [[ -n "$APP_TO_PROCESS" && "$APP" != *"$APP_TO_PROCESS"* ]]; then
echo "Skipping $APP"
continue
fi

declare -a APKS=($(find $1 -name "*.apk" | sort -V))

for APK in $APKS;
do
ProcessApp $APP $APK
done
done
elif [[ -n "$APP_TO_PROCESS" ]]; then
ProcessApp $APP_TO_PROCESS $APP_VERSION
else
for APP in $APPS;
Expand Down

0 comments on commit 4321614

Please sign in to comment.