mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-10-01 01:35:54 -04:00
More fixes
Ensure new shells have the correct settings too. Signed-off-by: Tad <tad@spotco.us>
This commit is contained in:
parent
042b9063d1
commit
b78944933c
@ -14,7 +14,9 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -uo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
if [ -d "$DOS_SIGNING_KEYS" ]; then
|
||||
echo "Copying verity/avb public keys to kernels...";
|
||||
|
@ -14,7 +14,9 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -uo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
#Goal: Remove as many proprietary blobs without breaking core functionality
|
||||
#Outcome: Increased battery/performance/privacy/security, Decreased ROM size
|
||||
|
@ -14,7 +14,9 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -euo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
commentPatches() {
|
||||
file="$1";
|
||||
|
@ -14,6 +14,7 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
|
||||
if [ "$DOS_NON_COMMERCIAL_USE_PATCHES" = true ]; then
|
||||
echo -e "\e[0;33mWARNING: YOU HAVE ENABLED PATCHES THAT WHILE ARE OPEN SOURCE ARE ALSO ENCUMBERED BY RESTRICTIVE LICENSES\e[0m";
|
||||
|
@ -14,7 +14,9 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -euo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
#Attempts to increase performance and battery life
|
||||
#Last verified: 2021-10-16
|
||||
|
@ -14,7 +14,9 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -uo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
#Attempts to patch kernels to be more secure
|
||||
|
||||
|
@ -14,7 +14,9 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -euo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
echo "Post tweaks...";
|
||||
|
||||
|
32
Scripts/Common/Shell.sh
Normal file
32
Scripts/Common/Shell.sh
Normal file
@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
#DivestOS: A privacy focused mobile distribution
|
||||
#Copyright (c) 2017-2021 Divested Computing Group
|
||||
#
|
||||
#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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
umask 0022;
|
||||
unalias cp &>/dev/null || true;
|
||||
unalias mv &>/dev/null || true;
|
||||
unalias rm &>/dev/null || true;
|
||||
unalias ln &>/dev/null || true;
|
||||
unalias mount &>/dev/null || true;
|
||||
unalias unmount &>/dev/null || true;
|
||||
unalias chown &>/dev/null || true;
|
||||
unalias chmod &>/dev/null || true;
|
||||
unalias chgrp &>/dev/null || true;
|
||||
unalias rmdir &>/dev/null || true;
|
||||
unalias mkdir &>/dev/null || true;
|
||||
unalias patch &>/dev/null || true;
|
||||
alias patch='patch --no-backup-if-mismatch';
|
||||
alias cp='cp --reflink=auto'
|
@ -14,7 +14,9 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -euo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
#Reference (MIT): https://grapheneos.org/build#generating-release-signing-keys
|
||||
|
||||
|
@ -14,7 +14,9 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -euo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
#Changes various default settings
|
||||
#Last verified: 2021-10-16
|
||||
|
@ -14,6 +14,7 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
|
||||
#Last verified: 2021-10-16
|
||||
|
||||
|
@ -14,7 +14,9 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -euo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
#Last verified: 2021-10-16
|
||||
|
||||
@ -38,6 +40,7 @@ set -euo pipefail;
|
||||
#START OF PREPRATION
|
||||
#
|
||||
#Download some (non-executable) out-of-tree files for use later on
|
||||
alias patch='patch --no-backup-if-mismatch';
|
||||
cd "$DOS_TMP_DIR";
|
||||
if [ "$DOS_HOSTS_BLOCKING" = true ]; then $DOS_TOR_WRAPPER wget "$DOS_HOSTS_BLOCKING_LIST" -N -O "$DOS_HOSTS_FILE"; fi;
|
||||
cd "$DOS_BUILD_BASE";
|
||||
|
@ -14,7 +14,9 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -euo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
#Updates select user facing strings
|
||||
#Last verified: 2021-10-16
|
||||
|
@ -14,7 +14,9 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -euo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
#Replaces teal accents with orange/yellow ones
|
||||
#Last verified: 2021-10-16
|
||||
|
@ -14,7 +14,9 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -euo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
#Changes various default settings
|
||||
#Last verified: 2021-10-16
|
||||
|
@ -14,6 +14,7 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
|
||||
#Last verified: 2021-10-16
|
||||
|
||||
@ -87,8 +88,7 @@ patchWorkspace() {
|
||||
touch DOS_PATCHED_FLAG;
|
||||
if [ "$DOS_MALWARE_SCAN_ENABLED" = true ]; then scanForMalware false "$DOS_PREBUILT_APPS $DOS_BUILD_BASE/build $DOS_BUILD_BASE/device $DOS_BUILD_BASE/vendor/lineage"; fi;
|
||||
|
||||
source build/envsetup.sh;
|
||||
repopick -it O_asb_2021-10;
|
||||
#source build/envsetup.sh;
|
||||
|
||||
sh "$DOS_SCRIPTS/Patch.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Copy_Keys.sh";
|
||||
|
@ -14,7 +14,9 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -euo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
#Last verified: 2021-10-16
|
||||
|
||||
|
@ -14,7 +14,9 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -euo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
#Updates select user facing strings
|
||||
#Last verified: 2021-10-16
|
||||
|
@ -14,7 +14,9 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -euo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
#Changes various default settings
|
||||
#Last verified: 2021-10-16
|
||||
|
@ -14,6 +14,7 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
|
||||
#Last verified: 2021-10-16
|
||||
|
||||
@ -75,9 +76,8 @@ patchWorkspace() {
|
||||
touch DOS_PATCHED_FLAG;
|
||||
if [ "$DOS_MALWARE_SCAN_ENABLED" = true ]; then scanForMalware false "$DOS_PREBUILT_APPS $DOS_BUILD_BASE/build $DOS_BUILD_BASE/device $DOS_BUILD_BASE/vendor/lineage"; fi;
|
||||
|
||||
source build/envsetup.sh;
|
||||
#source build/envsetup.sh;
|
||||
#repopick -it pie-firewall;
|
||||
repopick -it P_asb_2021-10;
|
||||
|
||||
sh "$DOS_SCRIPTS/Patch.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Copy_Keys.sh";
|
||||
|
@ -14,7 +14,9 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -euo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
#Last verified: 2021-10-16
|
||||
|
||||
|
@ -14,7 +14,9 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -euo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
#Updates select user facing strings
|
||||
#Last verified: 2021-10-16
|
||||
|
@ -14,7 +14,9 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -euo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
#Changes various default settings
|
||||
#Last verified: 2021-10-16
|
||||
|
@ -14,6 +14,7 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
|
||||
#Last verified: 2021-10-16
|
||||
|
||||
|
@ -14,7 +14,9 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -euo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
#Last verified: 2021-10-16
|
||||
|
||||
|
@ -14,7 +14,9 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -euo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
#Updates select user facing strings
|
||||
#Last verified: 2021-10-16
|
||||
|
@ -14,7 +14,9 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -euo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
#Changes various default settings
|
||||
#Last verified: 2021-10-16
|
||||
|
@ -14,6 +14,7 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
|
||||
#Last verified: 2021-10-16
|
||||
|
||||
|
@ -14,7 +14,9 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -euo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
#Last verified: 2021-10-16
|
||||
|
||||
|
@ -14,7 +14,9 @@
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -euo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
#Updates select user facing strings
|
||||
#Last verified: 2021-10-16
|
||||
|
@ -165,7 +165,6 @@ export GRADLE_OPTS="-Xmx2048m";
|
||||
export TZ=:/etc/localtime;
|
||||
export LC_ALL=C;
|
||||
export LANG=en_US.UTF-8;
|
||||
alias patch='patch --no-backup-if-mismatch';
|
||||
|
||||
#START OF VERIFICATION
|
||||
#gpgVerifyGitHead $DOS_WORKSPACE_ROOT;
|
||||
@ -174,12 +173,6 @@ alias patch='patch --no-backup-if-mismatch';
|
||||
#gpgVerifyGitHead $DOS_WALLPAPERS;
|
||||
#END OF VERIFICATION
|
||||
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
source "$DOS_SCRIPTS_COMMON/Functions.sh";
|
||||
source "$DOS_SCRIPTS/Functions.sh";
|
||||
|
||||
unalias cp &>/dev/null || true;
|
||||
unalias mv &>/dev/null || true;
|
||||
unalias rm &>/dev/null || true;
|
||||
unalias ln &>/dev/null || true;
|
||||
|
||||
alias cp='cp --reflink=auto'
|
||||
|
Loading…
Reference in New Issue
Block a user