<<'////'
SOME
COMMENTS
LINES
////
Same as if syntax,but I use this syntax because more simple.
[ Conditional ] && {
(When true)
} || {
(When false)
}
It can treat multiple commands stdout as one command stdout.
{
echo foo,bar,baz
echo hoge,fuga,piyo
}|column -t -s,
foo bar baz
hoge fuga piyo
It is also method of sending stdin to a command similar to a pipe.
cat </path/to/file_input
## Same as: cat /path/to/file_input | cat
cat <<"EOF"
foo
bar
baz
EOF
## Same as: echo -e "foo\nbar\nbaz" | cat
cat <<"Your Stdin text"
## Same as: echo "Your Stdin text" | cat
Script will request to github api and check if current version is outdated.
jq command parses responce from API.
Version information will parsed from ".name",and download URL from ".assets[-1].browser_download_url".
Current version is saved directry in the filename of its binary.
App version checking process is functionized.
Extract neccesary data from this command and return.
Here is flow of extraction of latest version information of specific app(Youtube in this example )
$ java -jar cli-* -c -b patches-* -m integrations-* -a- -o- -l --with-versions --with-packages
INFO: trill tiktok-ads Removes ads from TikTok.
INFO: musically tiktok-ads Removes ads from TikTok.
INFO: youtube swipe-controls Adds volume and brightness swipe controls. 17.24.34, 17.25.34, 17.26.35, 17.27.39, 17.28.34, 17.29.34, 17.32.35
INFO: youtube downloads Enables downloading music and videos from YouTube. 17.27.39, 17.29.34, 17.32.35
$ !! | grep -m1 ${youtube[1]}
INFO: youtube swipe-controls Adds volume and brightness swipe controls. 17.24.34, 17.25.34, 17.26.35, 17.27.39, 17.28.34, 17.29.34, 17.32.35
$ !! | awk '{print $NF}'
17.32.35
function is called first from here.
Variable $opt is incremented every version information inquiry to function.This number is for user input of which apps do you wanna patch,it corresponds to the element number of the $apps[] array.
Downloading function is here.Script generates download URL for required version and call Apkcombo's checkin API to generate token.
Script will automaticlly downloads apk from URL with checkin token.
$isDroid is boolean variable that if user running on Termux defined here.
termux-open command will open system installer dialog.
Because Apkpure and Apkmirror uses Cloudflare UAM,this may prevent scraping web site from curl request.
So,the only way to avoid this problem is webview based crawrer such as puppeteer,playwright,selenium.but if use them, it will depend nodejs and makes too bloat.
Working directory is under ~/.revanced. Downloaded binaries,keystore,cache is saved in this directory.
I wanna contribute to this project, but I have parts of process that I dont understand how it works!
Please create new issue.