Skip to content

Commit 9958a73

Browse files
committed
Remove laos 16.0 specific code
1 parent a92069e commit 9958a73

File tree

1 file changed

+3
-48
lines changed

1 file changed

+3
-48
lines changed

laos_build.sh

Lines changed: 3 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,9 @@ set -e
55

66
rev=$1
77
dev=${2-""}
8-
myrepo=""
98
if [[ "${3-""}" =~ ^[0-9]+$ ]]; then
109
# $3 is an integer
1110
thr=$3
12-
if [ "${rev}" == "16.0" ] && [ "${dev}" == "potter" ]; then
13-
myrepo=$4
14-
fi
15-
else
16-
if [ "${rev}" == "16.0" ] && [ "${dev}" == "potter" ]; then
17-
myrepo=$3
18-
fi
1911
fi
2012

2113
### FUNCTIONS ###
@@ -250,21 +242,6 @@ function pick_unmerged_commits {
250242
return 0
251243
}
252244

253-
function switch_tree {
254-
orig="boulzordev/android_device_motorola_potter"
255-
new="gothicVI/android_device_motorola_potter-lineage-16.0"
256-
file="${HOME}/git/AndroidDevelopment/potter_16.0.xml"
257-
sed -i "s#${orig}#${new}#g" "${file}" || exit 1
258-
return 0
259-
}
260-
261-
function reverse_switch_tree {
262-
cd "${HOME}/git/AndroidDevelopment" || exit 1
263-
file="${HOME}/git/AndroidDevelopment/potter_16.0.xml"
264-
git restore "${file}" || exit 1
265-
return 0
266-
}
267-
268245
function revert_version_defaults {
269246
if [ -d build/core ]; then
270247
cd build/core || exit 1
@@ -299,26 +276,10 @@ function revert_default {
299276

300277
function sync_repository {
301278
while true; do
302-
if [ "${rev}" == "16.0" ] && [ "${dev}" == "potter" ]; then
303-
reverse_switch_tree || exit 1
304-
cd - > /dev/null || exit 1
305-
rm -rfv ./device/motorola
306-
export LC_ALL=C
307-
# shellcheck source=/dev/null
308-
source build/envsetup.sh
309-
echo
310-
repo sync -v -j 1 -c --no-tags --no-clone-bundle --force-sync --fail-fast device/motorola/potter 2>&1 || exit 1
311-
echo
312-
yn="y"
313-
else
314-
read -rp "Do you wish to sync the repository? Type Y/y, D/d for device specific only, or N/n and hit return: " yn
315-
fi
279+
read -rp "Do you wish to sync the repository? Type Y/y, D/d for device specific only, or N/n and hit return: " yn
316280
case $yn in
317281
[Yy]* ) echo
318282
revert_default || exit 1
319-
if [ "${myrepo}" != "" ]; then
320-
switch_tree || exit 1
321-
fi
322283
echo
323284
revert_version_defaults || exit 1
324285
repo sync -v -j 1 -c --no-tags --no-clone-bundle --force-sync --fail-fast 2>&1 || exit 1
@@ -342,9 +303,6 @@ function sync_repository {
342303
elif [ "${dev}" == "sargo" ]; then
343304
rm -rfv ./device/google ./kernel/google ./vendor/google
344305
fi
345-
if [ "${myrepo}" != "" ]; then
346-
switch_tree || exit 1
347-
fi
348306
echo
349307
revert_version_defaults || exit 1
350308
repo sync -v -j 1 -c --no-tags --no-clone-bundle --force-sync --fail-fast 2>&1 || exit 1
@@ -382,7 +340,7 @@ function build {
382340
source build/envsetup.sh || exit 1
383341
breakfast "${dev}" || exit 1
384342
croot
385-
if [ "${thr}" == "" ]; then
343+
if [ "${thr-""}" == "" ]; then
386344
brunch "${dev}" || exit 1
387345
else
388346
breakfast "${dev}" || exit 1
@@ -411,7 +369,7 @@ function cleanup {
411369
rm -fv "./lineage_${dev}-ota-"*.zip
412370
rm -fv "./lineage-${rev}-"*"-UNOFFICIAL-${dev}.zip.md5sum"
413371
# Move/Rename the output zip
414-
mv -v "${output}" "${HOME}/Schreibtisch/android/${outputtag}${outputname}_security-patch-date_${securitypatchdate}${myrepo}.zip" || exit 1
372+
mv -v "${output}" "${HOME}/Schreibtisch/android/${outputtag}${outputname}_security-patch-date_${securitypatchdate}.zip" || exit 1
415373
pkill java
416374
echo
417375
while true; do
@@ -499,7 +457,4 @@ echo "Cleanup..."
499457
echo "##########"
500458
echo
501459
cleanup || exit 1
502-
if [ "${myrepo}" != "" ]; then
503-
reverse_switch_tree || exit 1
504-
fi
505460
exit 0

0 commit comments

Comments
 (0)