Add update hook functions

gf-arm64
ShaneTheAwesome 4 years ago
parent 20f5a9187f
commit 8135aa2d7f

@ -39,3 +39,10 @@ Pretty self explanatory. Leave them blank with a return 0 if there's no use for
- stuff_repos: List of FDroid format app repositories that are to be downloaded and their contents used by update.sh. First column has their names, which are to be unique and are the key to access them in stuff_download. Second column is the URL, to which appending '/index-v1.jar' should result in an object downloadable by wget.
- stuff_download: List of actual objects that are put into resdl by update.sh. First column is the filepath inside resdl that it should be put in. Second column is the source that it comes from, which is one of local, direct, github, gitlab, or repo. Other columns depend upon the source and any extra columns are ignored. For local, third column is a path resolved against the repo directory from which the file is cp'd to the destination. For direct, the third column is a URL that must be downloadable using wget. For github and gitlab, the third column is [repo owner]/[repo name] from which the newest file is grabbed from the releases page, optionally filtering only for the regex-enabled suffix in the fourth column if provided. For repo, it's the [repo key]/[package name] of which the latest APK is grabbed, optionally filtering for the arch if provided in the third column (arch is usually one of arm64-v8a, armeabi, armeabi-v7a, mips, mips64, x86, x86_64).
## Functions in resdl-conf file
- pre_update_actions()
- post_update_actions()
Again, they speak for themselves.

@ -45,3 +45,15 @@ stuff_download="
/system/priv-app/GoogleBackupTransport/-28-/GoogleBackupTransport.apk direct https://gitlab.opengapps.org/opengapps/all/raw/master/priv-app/com.google.android.backuptransport/28/nodpi/28.apk
/system/priv-app/PatchPhonesky/PatchPhonesky.apk repo nanolx/com.android.vending
";
pre_update_actions() {
return 0;
}
post_update-actions() {
return 0;
}

@ -58,6 +58,10 @@ $(echo "$stuff_repo" | grep -P "^[ \t]*$(dirname "$repo")[ \t]+" | head -n1)
stuff_repo="$(echo "$stuff_repo_new" | sort -u)";
fi;
# Pre update actions
pre_update_actions;
# Download repos
echo " ";
@ -144,6 +148,10 @@ for object in $(echo "$stuff_download" | awk '{ print $1 }'); do
[ -f "$resdldir/$object" ] || { echo "ERROR: $object failed to copy"; continue; }
done;
# Post update actions
post_update_actions;
# Done
echo " ";

Loading…
Cancel
Save