build.sh: Inprove argument processing

gf-arm64
FriendlyNeighborhoodShane 4 years ago
parent ef9721ed0c
commit b8e38e94b2

@ -93,7 +93,7 @@ To build all the packs and place them in the releases directory.
That's it! If it tells you that some dependency is missing, install it.
You can pass update.sh several perl-style regexes as arguments to only download specific files.
You can pass build.sh a specific pack's conf name instead of all to build only the specific pack.
You can pass build.sh some specific pack's conf names instead of all to build only the specific packs.
If you have the Java SDK and openssl tool installed, the update script will dump the signing certificates of all downloaded APKs and repo jars to resdl/util/certs. It will compare all future downloads with those certs, and in case of any signature errors or mismatches, will warn you.

@ -15,7 +15,6 @@ abort() {
workdir="$(pwd)";
cd "$workdir" || abort "Can't cd to $workdir";
confvar="$1";
resdir="$workdir/res";
resdldir="$workdir/resdl";
reldir="$workdir/releases";
@ -39,19 +38,27 @@ echo " - Build started at $buildtime";
[ "$1" ] || abort "No variant specified to build";
case "$1" in
all)
echo " ";
echo " - Building all packages...";
echo " ";
for list in $(find "$workdir/conf" -name "defconf-*.txt" | sed -e "s|^$workdir/conf/defconf-||g" -e "s|.txt$||g"); do
echo " - Executing build for $list...";
"$workdir/build.sh" "$list";
done;
exit;
;;
esac;
if [ "$1" = "all" ]; then
echo " ";
echo " - Building all packages...";
echo " ";
for var in $(find "$workdir/conf" -name "defconf-*.txt" | sed -e "s|^$workdir/conf/defconf-||g" -e "s|.txt$||g"); do
echo " - Executing build for $var...";
"$workdir/build.sh" "$var";
done;
exit;
elif [ "$#" -gt "1" ]; then
echo " ";
echo " - Building packages: $*...";
echo " ";
for var in "$@"; do
echo " - Executing build for $var...";
"$workdir/build.sh" "$var";
done;
exit;
fi;
confvar="$1";
[ -f "$workdir/conf/defconf-$confvar.txt" ] || abort "No $confvar variant defconf found";
echo " ";

Loading…
Cancel
Save