Add a warning when restricted patches are enabled

This commit is contained in:
Tad 2018-04-23 18:18:09 -04:00
parent f122ccb9f1
commit 520dbf246a
2 changed files with 8 additions and 1 deletions

View File

@ -15,6 +15,13 @@
#You should have received a copy of the GNU General Public License #You should have received a copy of the GNU General Public License
#along with this program. If not, see <https://www.gnu.org/licenses/>. #along with this program. If not, see <https://www.gnu.org/licenses/>.
if [ "$NON_COMMERCIAL_USE_PATCHES" = true ]; then
echo -e "\e[0;33mWARNING: YOU HAVE ENABLED PATCHES THAT WHILE OPEN SOURCE ARE ENCUMBERED BY RESTRICTIVE LICENSES\e[0m";
echo -e "\e[0;33mPLEASE SEE THE 'LICENSES' FILE AT THE ROOT OF THIS REPOSITORY FOR MORE INFORMATION\e[0m";
echo -e "\e[0;33mDISABLE THEM BY SETTING 'NON_COMMERCIAL_USE_PATCHES' TO 'false' IN 'Scripts/*/00init.sh'\e[0m";
sleep 15;
fi;
startPatcher() { startPatcher() {
#$cvePatcher must be set! #$cvePatcher must be set!
java -jar $cvePatcher patch $base $androidWorkspace"Patches/" $cveScripts $1; java -jar $cvePatcher patch $base $androidWorkspace"Patches/" $cveScripts $1;

View File

@ -157,7 +157,7 @@ enterAndClear "packages/inputmethods/LatinIME";
patch -p1 < $patches"android_packages_inputmethods_LatinIME/0001-Voice.patch"; #Remove voice input key patch -p1 < $patches"android_packages_inputmethods_LatinIME/0001-Voice.patch"; #Remove voice input key
enterAndClear "packages/services/Telephony"; enterAndClear "packages/services/Telephony";
if [ "$NON_COMMERCIAL_USE_PATCHES" = true ]; then patch -p1 < $patches"android_packages_services_Telephony/Copperhead/0001-LTE_Only.patch"; fi; #LTE only preferred network mode choice. (Copperhead CC BY-NC-SA) if [ "$NON_COMMERCIAL_USE_PATCHES" = true ]; then patch -p1 < $patches"android_packages_services_Telephony/Copperhead/0001-LTE_Only.patch"; fi; #LTE only preferred network mode choice (Copperhead CC BY-NC-SA)
enterAndClear "system/core"; enterAndClear "system/core";
cat /tmp/ar/hosts >> rootdir/etc/hosts; #Merge in our HOSTS file cat /tmp/ar/hosts >> rootdir/etc/hosts; #Merge in our HOSTS file