Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
j-hc committed Sep 29, 2024
1 parent 3e3cf49 commit 45bf672
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
8 changes: 5 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ java --version >/dev/null || abort "\`openjdk 17\` is not installed. install it
zip --version >/dev/null || abort "\`zip\` is not installed. install it with 'apt install zip' or equivalent"
# ----------------
rm -rf revanced-magisk/bin/*/tmp.*
: >"$TEMP_DIR"/*-rv/changelog.md || :

get_prebuilts

declare -A cliriplib
Expand Down Expand Up @@ -160,14 +162,14 @@ for table_name in $(toml_get_table_names); do
done
wait
rm -rf temp/tmp.*
if [ -z "$(ls -A1 ${BUILD_DIR})" ]; then abort "All builds failed."; fi
if [ -z "$(ls -A1 "${BUILD_DIR}")" ]; then abort "All builds failed."; fi

log "\nInstall [Microg](https://github.com/ReVanced/GmsCore/releases) for non-root YouTube and YT Music APKs"
log "Use [zygisk-detach](https://github.com/j-hc/zygisk-detach) to detach root ReVanced YouTube and YT Music from Play Store"
log "\n[revanced-magisk-module](https://github.com/j-hc/revanced-magisk-module)\n"
log "$(cat $TEMP_DIR/*-rv/changelog.md)"
log "$(cat "$TEMP_DIR"/*-rv/changelog.md)"

SKIPPED=$(cat $TEMP_DIR/skipped 2>/dev/null || :)
SKIPPED=$(cat "$TEMP_DIR"/skipped 2>/dev/null || :)
if [ -n "$SKIPPED" ]; then
log "\nSkipped:"
log "$SKIPPED"
Expand Down
9 changes: 4 additions & 5 deletions utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ get_rv_prebuilts() {

local url file tag_name name
file=$(find "$dir" -name "revanced-${tag,,}-${name_ver#v}.${ext}" -type f 2>/dev/null)
if [ "$ver" = "latest" ]; then
file=$(grep -v dev <<<"$file" | head -1)
else file=$(grep "$ver" <<<"$file" | head -1); fi

if [ -z "$file" ]; then
local resp asset name
resp=$(gh_req "$rv_rel" -) || return 1
Expand All @@ -84,10 +80,13 @@ get_rv_prebuilts() {
if [ "$tag" = "Integrations" ]; then integs_file=$file; fi
echo "$tag: $(cut -d/ -f1 <<<"$src")/${name} " >>"${cl_dir}/changelog.md"
else
if [ "$ver" = "latest" ]; then
file=$(grep -v dev <<<"$file" | head -1)
else file=$(grep "${ver#v}" <<<"$file" | head -1); fi
name=$(basename "$file")
tag_name=$(cut -d'-' -f3- <<<"$name")
tag_name=v${tag_name%.*}
if [ "$tag_name" = "v" ]; then abort; fi
if [ "$tag_name" = "v" ]; then abort "wrong ver"; fi
fi

echo -n "$file "
Expand Down

0 comments on commit 45bf672

Please sign in to comment.