mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-10-01 01:35:54 -04:00
CI: enable shellcheck
Signed-off-by: Tavi <tavi@divested.dev>
This commit is contained in:
parent
03e48ad81b
commit
42a5da8f16
7
.gitlab-ci.yml
Normal file
7
.gitlab-ci.yml
Normal file
@ -0,0 +1,7 @@
|
||||
shell check:
|
||||
image: koalaman/shellcheck-alpine:stable
|
||||
stage: test
|
||||
before_script:
|
||||
- shellcheck --version
|
||||
script:
|
||||
- shellcheck --severity=error Scripts/*.sh Scripts/*/*.sh Scripts/*/*/*.sh
|
@ -746,6 +746,7 @@ deblobDevice() {
|
||||
sed -i 's|name="dpm_enabled" type="int"> 1 <|name="dpm_enabled" type="int"> 0 <|' configs/qmi_config.xml; #Disable DPM
|
||||
fi;
|
||||
fi;
|
||||
# shellcheck disable=SC2144
|
||||
if [ -f init/init_*.cpp ]; then
|
||||
#Disable IMS
|
||||
if [ "$DOS_DEBLOBBER_REMOVE_IMS" = true ]; then
|
||||
|
@ -123,6 +123,7 @@ gpgVerifyDirectory() {
|
||||
export -f gpgVerifyDirectory;
|
||||
|
||||
scanForMalware() {
|
||||
# shellcheck disable=SC2144
|
||||
if [ -x /usr/bin/clamscan ] && [ -r /var/lib/clamav/main.c*d ]; then
|
||||
echo -e "\e[0;32mStarting a malware scan...\e[0m";
|
||||
local excludes="--exclude-dir=\".git\" --exclude-dir=\".repo\"";
|
||||
@ -402,6 +403,7 @@ processRelease() {
|
||||
#grep update_engine Build/*/device/*/*/*.mk -l
|
||||
local DOS_GENERATE_DELTAS_DEVICES=('akari' 'akatsuki' 'alioth' 'Amber' 'aura' 'aurora' 'avicii' 'barbet' 'bluejay' 'blueline' 'bonito' 'bramble' 'cheetah' 'cheryl' 'coral' 'crosshatch' 'davinci' 'discovery' 'enchilada' 'fajita' 'felix' 'flame' 'FP3' 'FP4' 'guacamole' 'guacamoleb' 'hotdog' 'hotdogb' 'instantnoodle' 'instantnoodlep' 'kebab' 'kirin' 'lemonade' 'lemonadep' 'lemonades' 'lynx' 'marlin' 'mata' 'mermaid' 'oriole' 'panther' 'pioneer' 'pro1' 'pro1x' 'raven' 'redfin' 'sailfish' 'sargo' 'sunfish' 'taimen' 'tangorpro' 'vayu' 'voyager' 'walleye' 'xz2c'); #TODO: check lmi/alioth/apollon
|
||||
if [ "$DOS_GENERATE_DELTAS" = true ]; then
|
||||
# shellcheck disable=SC2199
|
||||
if [[ " ${DOS_GENERATE_DELTAS_DEVICES[@]} " =~ " ${DEVICE} " ]]; then
|
||||
for LAST_TARGET_FILES in $ARCHIVE/target_files/$DOS_BRANDING_ZIP_PREFIX-$VERSION-*-dos-$DEVICE-target_files.zip; do
|
||||
if [[ -f "$LAST_TARGET_FILES.id" ]]; then
|
||||
@ -457,6 +459,7 @@ processRelease() {
|
||||
if [ "$hasRecoveryImg" == "1" ] || [ "$hasDtboImg" == "0" ]; then cp -v $OUT_DIR/$PREFIX-fastboot.zip* $ARCHIVE/fastboot/ || true; fi;
|
||||
if [ "$hasRecoveryImg" == "0" ] && [ "$hasDtboImg" == "1" ]; then cp -v $OUT_DIR/$PREFIX-recovery.img* $ARCHIVE/ || true; fi;
|
||||
if [ "$DOS_GENERATE_DELTAS" = true ]; then
|
||||
# shellcheck disable=SC2199
|
||||
if [[ " ${DOS_GENERATE_DELTAS_DEVICES[@]} " =~ " ${DEVICE} " ]]; then
|
||||
cp -v $OUT_DIR/$PREFIX-target_files.zip* $ARCHIVE/target_files/ || true;
|
||||
cp -v $OUT_DIR/$PREFIX-incremental_*.zip* $ARCHIVE/incrementals/ || true;
|
||||
|
@ -29,6 +29,7 @@ echo "==========================================================================
|
||||
for f in */verifiedboot_relkeys.der.x509
|
||||
do
|
||||
device=$(dirname $f);
|
||||
# shellcheck disable=SC2199
|
||||
if [[ " ${VERITY_DEVICES[@]} " =~ " ${device} " ]]; then
|
||||
echo "Device: $device";
|
||||
sha1=$(cat $f | openssl dgst -sha1 -c | sed 's/SHA1(stdin)= //' | tr [a-z] [A-Z]);
|
||||
@ -48,6 +49,7 @@ echo "==========================================================================
|
||||
for f in */avb_pkmd.bin
|
||||
do
|
||||
device=$(dirname $f);
|
||||
# shellcheck disable=SC2199
|
||||
if [[ " ${AVB_DEVICES[@]} " =~ " ${device} " ]]; then
|
||||
echo "Device: $device";
|
||||
sha256=$(cat $f | openssl dgst -sha256 | sed 's/SHA2-256(stdin)= //' | tr [a-z] [A-Z]);
|
||||
|
Loading…
Reference in New Issue
Block a user