From ca05b3aca6df5b7a02fd07f1bd7310571abe3169 Mon Sep 17 00:00:00 2001 From: Tad Date: Sat, 2 Jun 2018 17:51:18 -0400 Subject: [PATCH] Deduplicate 00init.sh --- Scripts/LineageOS-15.1/00init.sh | 61 ------------------- Scripts/{LineageOS-14.1/00init.sh => init.sh} | 28 +++++---- 2 files changed, 15 insertions(+), 74 deletions(-) delete mode 100644 Scripts/LineageOS-15.1/00init.sh rename Scripts/{LineageOS-14.1/00init.sh => init.sh} (82%) diff --git a/Scripts/LineageOS-15.1/00init.sh b/Scripts/LineageOS-15.1/00init.sh deleted file mode 100644 index 70d841ef..00000000 --- a/Scripts/LineageOS-15.1/00init.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash -#DivestOS: A privacy oriented Android distribution -#Copyright (c) 2017-2018 Spot Communications, Inc. -# -#This program is free software: you can redistribute it and/or modify -#it under the terms of the GNU General Public License as published by -#the Free Software Foundation, either version 3 of the License, or -#(at your option) any later version. -# -#This program is distributed in the hope that it will be useful, -#but WITHOUT ANY WARRANTY; without even the implied warranty of -#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -#GNU General Public License for more details. -# -#You should have received a copy of the GNU General Public License -#along with this program. If not, see . - -#Sets settings used by all other scripts - -export androidWorkspace="/mnt/Drive-3/"; -export base=$androidWorkspace"Build/LineageOS-15.1/"; - -export SIGNING_KEY_DIR=$androidWorkspace"Signing_Keys"; -export OTA_PACKAGE_SIGNING_KEY=$SIGNING_KEY_DIR"/releasekey" - -export prebuiltApps=$androidWorkspace"PrebuiltApps/"; -export patches=$androidWorkspace"Patches/LineageOS-15.1/"; -export cvePatchesLinux=$androidWorkspace"Patches/Linux/"; -export cvePatchesAndroid=$androidWorkspace"Patches/Android/"; -export dosWallpapers=$androidWorkspace"Patches/Wallpapers/"; - -export scriptsCommon=$androidWorkspace"Scripts/Common/"; -export scripts=$androidWorkspace"Scripts/LineageOS-15.1/"; -export cveScripts=$scripts"CVE_Patchers/"; - -export ANDROID_HOME="/home/$USER/Android/Sdk"; - -export KBUILD_BUILD_USER="emy"; -export KBUILD_BUILD_HOST="dosbm"; - -export ANDROID_JACK_VM_ARGS="-Xmx6144m -Xms512m -Dfile.encoding=UTF-8 -XX:+TieredCompilation"; -export JACK_SERVER_VM_ARGUMENTS="${ANDROID_JACK_VM_ARGS}"; - -export GRADLE_OPTS="-Xmx2048m"; - -export NON_COMMERCIAL_USE_PATCHES=false; #Switch to false to prevent inclusion of non-commercial use patches - -export MICROG_INCLUDED=true; #Switch to false to prevent inclusion of microG - -export MALWARE_SCAN_ENABLED=true; #Set true to perform a fast scan on patchWorkspace() and a through scan on buildAll() -export MALWARE_SCAN_SETTING="quick"; #buildAll() scan speed. Options are quick, extra, slow, full - -source $scriptsCommon"/Functions.sh"; -source $scripts"/Functions.sh"; - -export LC_ALL=C; - -unalias cp; -unalias mv; -unalias rm; -unalias ln; diff --git a/Scripts/LineageOS-14.1/00init.sh b/Scripts/init.sh similarity index 82% rename from Scripts/LineageOS-14.1/00init.sh rename to Scripts/init.sh index 45322eac..8a6bdcf0 100644 --- a/Scripts/LineageOS-14.1/00init.sh +++ b/Scripts/init.sh @@ -17,20 +17,30 @@ #Sets settings used by all other scripts -export androidWorkspace="/mnt/Drive-3/"; -export base=$androidWorkspace"Build/LineageOS-14.1/"; +#START OF USER CONFIGURABLE OPTIONS +export MALWARE_SCAN_ENABLED=true; #Set true to perform a fast scan on patchWorkspace() and a through scan on buildAll() +export MALWARE_SCAN_SETTING="quick"; #buildAll() scan speed. Options are quick, extra, slow, full +export MICROG_INCLUDED=true; #Switch to false to prevent inclusion of microG +export NON_COMMERCIAL_USE_PATCHES=false; #Switch to false to prevent inclusion of non-commercial use patches + +export androidWorkspace="/mnt/Drive-3/"; #XXX: THIS MUST BE CORRECT TO BUILD! +#END OF USER CONFIGURABLE OPTIONS + +BUILD_WORKING_DIR=${PWD##*/}; export SIGNING_KEY_DIR=$androidWorkspace"Signing_Keys"; -export OTA_PACKAGE_SIGNING_KEY=$SIGNING_KEY_DIR"/releasekey" +export OTA_PACKAGE_SIGNING_KEY=$SIGNING_KEY_DIR"/releasekey"; + +export base=$androidWorkspace"Build/$BUILD_WORKING_DIR/"; export prebuiltApps=$androidWorkspace"PrebuiltApps/"; -export patches=$androidWorkspace"Patches/LineageOS-14.1/"; +export patches=$androidWorkspace"Patches/$BUILD_WORKING_DIR/"; export cvePatchesLinux=$androidWorkspace"Patches/Linux/"; export cvePatchesAndroid=$androidWorkspace"Patches/Android/"; export dosWallpapers=$androidWorkspace"Patches/Wallpapers/"; export scriptsCommon=$androidWorkspace"Scripts/Common/"; -export scripts=$androidWorkspace"Scripts/LineageOS-14.1/"; +export scripts=$androidWorkspace"Scripts/$BUILD_WORKING_DIR/"; export cveScripts=$scripts"CVE_Patchers/"; export ANDROID_HOME="/home/$USER/Android/Sdk"; @@ -40,16 +50,8 @@ export KBUILD_BUILD_HOST="dosbm"; export ANDROID_JACK_VM_ARGS="-Xmx6144m -Xms512m -Dfile.encoding=UTF-8 -XX:+TieredCompilation"; export JACK_SERVER_VM_ARGUMENTS="${ANDROID_JACK_VM_ARGS}"; - export GRADLE_OPTS="-Xmx2048m"; -export NON_COMMERCIAL_USE_PATCHES=false; #Switch to false to prevent inclusion of non-commercial use patches - -export MICROG_INCLUDED=true; #Switch to false to prevent inclusion of microG - -export MALWARE_SCAN_ENABLED=true; #Set true to perform a fast scan on patchWorkspace() and a through scan on buildAll() -export MALWARE_SCAN_SETTING="quick"; #buildAll() scan speed. Options are quick, extra, slow, full - source $scriptsCommon"/Functions.sh"; source $scripts"/Functions.sh";