From 00e434586043082985e2ba8c781d6d4672c5f339 Mon Sep 17 00:00:00 2001
From: MiRinChan <148533509+MiRinChan@users.noreply.github.com>
Date: Fri, 24 Jan 2025 15:36:00 +0800
Subject: [PATCH 1/2] script: fix cannot get list caused by Google website
changed
---
module/action.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/module/action.sh b/module/action.sh
index 084f2d8..43d11a2 100644
--- a/module/action.sh
+++ b/module/action.sh
@@ -55,7 +55,7 @@ ID="$(grep -m1 -o 'Build:.*' PIXEL_GSI_HTML | cut -d' ' -f2)"
INCREMENTAL="$(grep -m1 -o "$ID-.*-" PIXEL_GSI_HTML | cut -d- -f2)"
download "https://developer.android.com$(grep -m1 'corresponding Google Pixel builds' PIXEL_GSI_HTML | grep -o 'href.*' | cut -d\" -f2)" > PIXEL_GET_HTML || download_fail
-download "https://developer.android.com$(grep -m1 'Factory images for Google Pixel' PIXEL_GET_HTML | grep -o 'href.*' | cut -d\" -f2)" > PIXEL_BETA_HTML || download_fail
+download "https://developer.android.com$(grep -m1 'Pixel downloads page' PIXEL_GET_HTML | grep -o 'href.*' | cut -d\" -f2)" > PIXEL_BETA_HTML || download_fail
MODEL_LIST="$(grep -A1 'tr id=' PIXEL_BETA_HTML | grep 'td' | sed 's;.*
\(.*\) | ;\1;')"
PRODUCT_LIST="$(grep -o 'factory/.*_beta' PIXEL_BETA_HTML | cut -d/ -f2)"
From 4cfc2aca2e04d834c9252408d85529491f531c40 Mon Sep 17 00:00:00 2001
From: MiRinChan <148533509+MiRinChan@users.noreply.github.com>
Date: Fri, 24 Jan 2025 20:13:57 +0800
Subject: [PATCH 2/2] script: fix the release name because google still not
changed the name
---
module/action.sh | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/module/action.sh b/module/action.sh
index 43d11a2..e78373f 100644
--- a/module/action.sh
+++ b/module/action.sh
@@ -50,7 +50,13 @@ download https://developer.android.com/topic/generic-system-image/releases > PIX
grep -m1 -o 'li>.*(Beta)' PIXEL_GSI_HTML | cut -d\> -f2
grep -m1 -o 'Date:.*' PIXEL_GSI_HTML
-RELEASE="$(grep -m1 'corresponding Google Pixel builds' PIXEL_GSI_HTML | grep -o '/versions/.*' | cut -d/ -f3)"
+current_timestamp=$(date +%s)
+threshold_timestamp=1740312000 # Baklava still not name as 16. TODO: Need to know what is the actually time of changeing the name of release.
+if [ "$current_timestamp" -lt "$threshold_timestamp" ]; then
+ RELEASE="Baklava"
+else
+ RELEASE="$(grep -m1 'corresponding Google Pixel builds' PIXEL_GSI_HTML | grep -o '/versions/.*' | cut -d/ -f3)"
+fi
ID="$(grep -m1 -o 'Build:.*' PIXEL_GSI_HTML | cut -d' ' -f2)"
INCREMENTAL="$(grep -m1 -o "$ID-.*-" PIXEL_GSI_HTML | cut -d- -f2)"