Skip to content

Instantly share code, notes, and snippets.

@ArianK16a
Last active February 8, 2022 17:30
Show Gist options
  • Select an option

  • Save ArianK16a/6004709bd8dd46e9668d8c1675d1e119 to your computer and use it in GitHub Desktop.

Select an option

Save ArianK16a/6004709bd8dd46e9668d8c1675d1e119 to your computer and use it in GitHub Desktop.

Revisions

  1. ArianK16a revised this gist Feb 8, 2022. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -86,6 +86,8 @@ build () {
    extra_arguments="-c -1001426238293"
    elif [ "$1" = "toco" ]; then
    extra_arguments="-c -1001443889354"
    elif [ "$1" = "violet" ]; then
    extra_arguments="-c -1001656828188"
    fi
    telegram $extra_arguments "Nightlies compilation for "$1" failed!"
    exit -1
    @@ -193,6 +195,10 @@ release () {
    name="for Mi Note 10 Lite "
    group="@lineage\_toco"
    extra_arguments="-c -1001443889354"
    elif [ "$device" = "violet" ]; then
    name="for Redmi Note 7 Pro "
    group="@LineageViolet"
    extra_arguments="-c -1001656828188"
    else
    extra_arguments="-c -1001159030901"
    group="#"$device""
  2. ArianK16a revised this gist Feb 3, 2022. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -60,8 +60,7 @@ build () {
    if [ "$DEBUG_BUILD" = 1 ]; then
    make installclean
    else
    # TMP change this to make clean again
    make installclean
    make clean
    fi
    telegram -N -M "*(i)* \`"$(basename $LOCAL_PATH)"\` compilation for \`"$1"\` *started* on "$HOSTNAME"."
    build_start=$(date +"%s")
  3. ArianK16a revised this gist Feb 3, 2022. 1 changed file with 10 additions and 10 deletions.
    20 changes: 10 additions & 10 deletions lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -199,23 +199,23 @@ release () {
    group="#"$device""
    fi
    telegram $extra_arguments -M " \
    *New LineageOS 18.1 build "$name"available! *
    *New LineageOS 18.1 build ${name}available! *
    💬 Variant: \`"$type"\`
    💬 Variant: \`${type}\`
    *Download*
    ⬇️ ["$project"]("$download_link")
    ⬇️ [recovery]("$recovery_download_link")
    ✅ [checksum]("$checksum_link"): \`"$checksum"\`
    ⬇️ [${project}](${download_link})
    ⬇️ [recovery](${recovery_download_link})
    ✅ [checksum](${checksum_link}): \`${checksum}\`
    🚧 [Changelog]("$changelog_link")
    🚧 [Changelog](${changelog_link})
    *Build stats*
    ⌛ Time: \`$time\`
    🗣️ User: \`$USERNAME\`
    💻 Host: \`$HOSTNAME\`
    ⌛ Time: \`${time}\`
    🗣️ User: \`${USERNAME}\`
    💻 Host: \`${HOSTNAME}\`
    "$group"
    ${group}
    "
    update_ota "$device" "$project" "$3"
    # TMP change this to make clean again
  4. ArianK16a revised this gist Jan 23, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -205,7 +205,7 @@ release () {
    *Download*
    ⬇️ ["$project"]("$download_link")
    ⬇️ ["lineage recovery"]("$recovery_download_link")
    ⬇️ [recovery]("$recovery_download_link")
    ✅ [checksum]("$checksum_link"): \`"$checksum"\`
    🚧 [Changelog]("$changelog_link")
  5. ArianK16a revised this gist Jan 22, 2022. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -75,6 +75,10 @@ build () {
    if [ -f $LOCAL_PATH/.last_build_time ] && ([[ $(ls $OUT/obj/PACKAGING/target_files_intermediates/*-target_files-*.zip) ]] || [[ $(ls "$OUT"/lineage-*-"$1".zip) ]]); then
    if [ "$signed" = 1 ]; then
    sign_target_files
    recovery_filename=$(cat "$OUT"/recovery/root/prop.default | grep ro.lineage.version=)
    recovery_filename="${recovery_filename#*=}"
    recovery_filename=lineage_recovery-"$recovery_filename".img
    unzip -p $OUT/signed-target_files-"$filename" IMAGES/recovery.img > $OUT/$recovery_filename
    fi
    upload "$1" "$2" "$3"
    else
    @@ -146,6 +150,8 @@ upload () {
    rsync -Ph out/target/product/"$1"/lineage-*-"$1".zip ariank16a@frs.sourceforge.net:/home/frs/project/ephedraceae/"$1"/"$project"/
    rsync -Ph out/target/product/"$1"/lineage-*-"$1".zip.sha256sum ariank16a@frs.sourceforge.net:/home/frs/project/ephedraceae/"$1"/"$project"/

    rsync -Ph out/target/product/"$1"/"$recovery_filename" ariank16a@frs.sourceforge.net:/home/frs/project/ephedraceae/"$1"/recovery/"$project"/

    if [[ "$2" = "test" ]]; then
    release_experimental "$1" "$project" "$3"
    elif [ "$DEBUG_BUILD" = 0 ]; then
    @@ -165,6 +171,7 @@ release () {
    fi

    download_link="https://sourceforge.net/projects/ephedraceae/files/"$1"/"$2"/$(basename $(ls out/target/product/"$1"/lineage-*-"$1".zip))"
    recovery_download_link="https://sourceforge.net/projects/ephedraceae/files/"$1"/recovery/"$2"/$(basename $(ls out/target/product/"$1"/lineage_recovery-*-"$1".img))"
    time="$(cat $LOCAL_PATH/.last_build_time)"
    checksum="$(cat "$LOCAL_PATH"/out/target/product/"$1"/lineage-*-"$1".zip.sha256sum | awk '{print $1}')"
    checksum_link="$download_link".sha256sum
    @@ -198,6 +205,7 @@ release () {
    *Download*
    ⬇️ ["$project"]("$download_link")
    ⬇️ ["lineage recovery"]("$recovery_download_link")
    ✅ [checksum]("$checksum_link"): \`"$checksum"\`
    🚧 [Changelog]("$changelog_link")
  6. ArianK16a revised this gist Jan 19, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -211,7 +211,7 @@ release () {
    "
    update_ota "$device" "$project" "$3"
    # TMP change this to make clean again
    make installclean
    #make installclean
    }

    # release device project gapps
  7. ArianK16a revised this gist Jan 19, 2022. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -192,7 +192,7 @@ release () {
    group="#"$device""
    fi
    telegram $extra_arguments -M " \
    *New LineageOS 18.1 build "$name"available\!*
    *New LineageOS 18.1 build "$name"available! *
    💬 Variant: \`"$type"\`
    @@ -239,7 +239,7 @@ release_experimental () {

    if [ "$1" = "davinci" ]; then
    telegram -c -1001426238293 -M " \
    *New LineageOS 18.1 build for Mi 9T available\!*
    *New LineageOS 18.1 build for Mi 9T available! *
    💬 Variant: \`EXPERIMENTAL "$type"\`
    *Download*
    ⬇️ ["$project"]("$download_link")
    @@ -249,7 +249,7 @@ release_experimental () {
    "
    elif [ "$1" = "toco" ]; then
    telegram -c -1001426238293 -M " \
    *New LineageOS 18.1 build for Mi Note 10 Lite available\!*
    *New LineageOS 18.1 build for Mi Note 10 Lite available!
    💬 Variant: \`EXPERIMENTAL "$type"\`
    *Download*
    ⬇️ ["$project"]("$download_link")
  8. ArianK16a revised this gist Jan 19, 2022. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -192,7 +192,7 @@ release () {
    group="#"$device""
    fi
    telegram $extra_arguments -M " \
    *New LineageOS 18.1 build "$name"available!*
    *New LineageOS 18.1 build "$name"available\!*
    💬 Variant: \`"$type"\`
    @@ -239,7 +239,7 @@ release_experimental () {

    if [ "$1" = "davinci" ]; then
    telegram -c -1001426238293 -M " \
    *New LineageOS 18.1 build for Mi 9T available!*
    *New LineageOS 18.1 build for Mi 9T available\!*
    💬 Variant: \`EXPERIMENTAL "$type"\`
    *Download*
    ⬇️ ["$project"]("$download_link")
    @@ -249,7 +249,7 @@ release_experimental () {
    "
    elif [ "$1" = "toco" ]; then
    telegram -c -1001426238293 -M " \
    *New LineageOS 18.1 build for Mi Note 10 Lite available!*
    *New LineageOS 18.1 build for Mi Note 10 Lite available\!*
    💬 Variant: \`EXPERIMENTAL "$type"\`
    *Download*
    ⬇️ ["$project"]("$download_link")
  9. ArianK16a revised this gist Jan 19, 2022. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -60,7 +60,8 @@ build () {
    if [ "$DEBUG_BUILD" = 1 ]; then
    make installclean
    else
    make clean
    # TMP change this to make clean again
    make installclean
    fi
    telegram -N -M "*(i)* \`"$(basename $LOCAL_PATH)"\` compilation for \`"$1"\` *started* on "$HOSTNAME"."
    build_start=$(date +"%s")
    @@ -209,7 +210,8 @@ release () {
    "$group"
    "
    update_ota "$device" "$project" "$3"
    make clean
    # TMP change this to make clean again
    make installclean
    }

    # release device project gapps
  10. ArianK16a revised this gist Jan 19, 2022. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -77,11 +77,11 @@ build () {
    fi
    upload "$1" "$2" "$3"
    else
    extra_argument=""
    extra_arguments=""
    if [ "$1" = "davinci" ]; then
    extra_argument="-c -1001426238293"
    extra_arguments="-c -1001426238293"
    elif [ "$1" = "toco" ]; then
    extra_argument="-c -1001443889354"
    extra_arguments="-c -1001443889354"
    fi
    telegram $extra_arguments "Nightlies compilation for "$1" failed!"
    exit -1
  11. ArianK16a revised this gist Jan 19, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -71,7 +71,7 @@ build () {
    brunch "$1"
    fi
    build_result "$1" "$3"
    if [ -f $LOCAL_PATH/.last_build_time ] && ([[ $(ls $OUT/ob/PACKAGING/target_files_intermediates/*-target_files-*.zip) ]] || [[ $(ls "$OUT"/lineage-*-"$1".zip) ]]); then
    if [ -f $LOCAL_PATH/.last_build_time ] && ([[ $(ls $OUT/obj/PACKAGING/target_files_intermediates/*-target_files-*.zip) ]] || [[ $(ls "$OUT"/lineage-*-"$1".zip) ]]); then
    if [ "$signed" = 1 ]; then
    sign_target_files
    fi
  12. ArianK16a revised this gist Jan 19, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -71,7 +71,7 @@ build () {
    brunch "$1"
    fi
    build_result "$1" "$3"
    if [ -f $LOCAL_PATH/.last_build_time ] & [ -f "$OUT"/lineage-*-"$1".zip ]; then
    if [ -f $LOCAL_PATH/.last_build_time ] && ([[ $(ls $OUT/ob/PACKAGING/target_files_intermediates/*-target_files-*.zip) ]] || [[ $(ls "$OUT"/lineage-*-"$1".zip) ]]); then
    if [ "$signed" = 1 ]; then
    sign_target_files
    fi
  13. ArianK16a revised this gist Jan 18, 2022. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -83,7 +83,7 @@ build () {
    elif [ "$1" = "toco" ]; then
    extra_argument="-c -1001443889354"
    fi
    telegram "$extra_arguments" "Nightlies compilation for "$1" failed!"
    telegram $extra_arguments "Nightlies compilation for "$1" failed!"
    exit -1
    fi
    }
    @@ -190,7 +190,7 @@ release () {
    extra_arguments="-c -1001159030901"
    group="#"$device""
    fi
    telegram "$extra_arguments" -M " \
    telegram $extra_arguments -M " \
    *New LineageOS 18.1 build "$name"available!*
    💬 Variant: \`"$type"\`
  14. ArianK16a revised this gist Dec 29, 2021. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -9,10 +9,10 @@ export USERNAME=arian
    export HOSTNAME=server
    LOCAL_PATH="$(pwd)"

    if [ "$DEBUG_BUILD" ]; then
    signed=false
    if [ "$DEBUG_BUILD" = 1 ]; then
    signed=0
    else
    signed=true
    signed=1
    fi

    telegram () {
    @@ -47,7 +47,7 @@ prepare_gapps () {
    # build device releasetype gapps
    build () {
    prepare
    if [ ! "$DEBUG_BUILD" ]; then
    if [ "$DEBUG_BUILD" = 0 ]; then
    repo sync --force-sync -q
    bash "$LOCAL_PATH"/picks.sh
    fi
    @@ -57,22 +57,22 @@ build () {
    prepare_vanilla
    fi
    breakfast "$1"
    if [ "$DEBUG_BUILD" ]; then
    if [ "$DEBUG_BUILD" = 1 ]; then
    make installclean
    else
    make clean
    fi
    telegram -N -M "*(i)* \`"$(basename $LOCAL_PATH)"\` compilation for \`"$1"\` *started* on "$HOSTNAME"."
    build_start=$(date +"%s")
    if [ "$signed" ]; then
    if [ "$signed" = 1 ]; then
    breakfast "$1"
    mka target-files-package otatools
    else
    brunch "$1"
    fi
    build_result "$1" "$3"
    if [ -f $LOCAL_PATH/.last_build_time ] & [ -f "$OUT"/lineage-*-"$1".zip ]; then
    if [ "$signed" ]; then
    if [ "$signed" = 1 ]; then
    sign_target_files
    fi
    upload "$1" "$2" "$3"
    @@ -147,7 +147,7 @@ upload () {

    if [[ "$2" = "test" ]]; then
    release_experimental "$1" "$project" "$3"
    elif [ ! "$DEBUG_BUILD" ]; then
    elif [ "$DEBUG_BUILD" = 0 ]; then
    release "$1" "$project" "$3"
    fi
    }
  15. ArianK16a revised this gist Dec 29, 2021. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -64,15 +64,15 @@ build () {
    fi
    telegram -N -M "*(i)* \`"$(basename $LOCAL_PATH)"\` compilation for \`"$1"\` *started* on "$HOSTNAME"."
    build_start=$(date +"%s")
    if [ signed ]; then
    if [ "$signed" ]; then
    breakfast "$1"
    mka target-files-package otatools
    else
    brunch "$1"
    fi
    build_result "$1" "$3"
    if [ -f $LOCAL_PATH/.last_build_time ] & [ -f "$OUT"/lineage-*-"$1".zip ]; then
    if [ signed ]; then
    if [ "$signed" ]; then
    sign_target_files
    fi
    upload "$1" "$2" "$3"
  16. ArianK16a revised this gist Dec 29, 2021. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@ export USERNAME=arian
    export HOSTNAME=server
    LOCAL_PATH="$(pwd)"

    if [ "DEBUG_BUILD" = "true" ]; then
    if [ "$DEBUG_BUILD" ]; then
    signed=false
    else
    signed=true
    @@ -47,7 +47,7 @@ prepare_gapps () {
    # build device releasetype gapps
    build () {
    prepare
    if [ "DEBUG_BUILD" != "true" ]; then
    if [ ! "$DEBUG_BUILD" ]; then
    repo sync --force-sync -q
    bash "$LOCAL_PATH"/picks.sh
    fi
    @@ -57,7 +57,7 @@ build () {
    prepare_vanilla
    fi
    breakfast "$1"
    if [ "DEBUG_BUILD" = "true" ]; then
    if [ "$DEBUG_BUILD" ]; then
    make installclean
    else
    make clean
    @@ -147,7 +147,7 @@ upload () {

    if [[ "$2" = "test" ]]; then
    release_experimental "$1" "$project" "$3"
    elif [ "DEBUG_BUILD" != "true" ]; then
    elif [ ! "$DEBUG_BUILD" ]; then
    release "$1" "$project" "$3"
    fi
    }
    @@ -389,4 +389,4 @@ update_changelog () {

    if [ -f env_overwrite.sh ]; then
    source env_overwrite.sh
    fi
    fi
  17. ArianK16a revised this gist Dec 28, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,7 @@ else
    fi

    telegram () {
    /home/arian/telegram.sh/telegram "$1" "$2" "$3" "$4" "$5"
    /home/arian/telegram.sh/telegram "$@"
    }

    prepare () {
  18. ArianK16a revised this gist Dec 27, 2021. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -47,8 +47,10 @@ prepare_gapps () {
    # build device releasetype gapps
    build () {
    prepare
    repo sync --force-sync -q
    bash "$LOCAL_PATH"/picks.sh
    if [ "DEBUG_BUILD" != "true" ]; then
    repo sync --force-sync -q
    bash "$LOCAL_PATH"/picks.sh
    fi
    if [ "$3" = "gapps" ]; then
    prepare_gapps
    else
  19. ArianK16a revised this gist Dec 27, 2021. 1 changed file with 11 additions and 4 deletions.
    15 changes: 11 additions & 4 deletions lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,11 @@ export USERNAME=arian
    export HOSTNAME=server
    LOCAL_PATH="$(pwd)"

    signed=true
    if [ "DEBUG_BUILD" = "true" ]; then
    signed=false
    else
    signed=true
    fi

    telegram () {
    /home/arian/telegram.sh/telegram "$1" "$2" "$3" "$4" "$5"
    @@ -51,8 +55,11 @@ build () {
    prepare_vanilla
    fi
    breakfast "$1"
    make clean
    # make installclean
    if [ "DEBUG_BUILD" = "true" ]; then
    make installclean
    else
    make clean
    fi
    telegram -N -M "*(i)* \`"$(basename $LOCAL_PATH)"\` compilation for \`"$1"\` *started* on "$HOSTNAME"."
    build_start=$(date +"%s")
    if [ signed ]; then
    @@ -138,7 +145,7 @@ upload () {

    if [[ "$2" = "test" ]]; then
    release_experimental "$1" "$project" "$3"
    else
    elif [ "DEBUG_BUILD" != "true" ]; then
    release "$1" "$project" "$3"
    fi
    }
  20. ArianK16a revised this gist Dec 27, 2021. 1 changed file with 37 additions and 62 deletions.
    99 changes: 37 additions & 62 deletions lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -1,18 +1,8 @@
    #!/bin/bash
    #
    # Copyright (C) 2019-2020 ArianK16a
    # Copyright (C) 2019-2021 ArianK16a
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    # http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    # SPDX-License-Identifier: Apache-2.0
    #

    export USERNAME=arian
    @@ -72,19 +62,19 @@ build () {
    brunch "$1"
    fi
    build_result "$1" "$3"
    if [ signed ]; then
    sign_target_files
    fi
    if [ -f $LOCAL_PATH/.last_build_time ] & [ -f "$OUT"/lineage-*-"$1".zip ]; then
    if [ signed ]; then
    sign_target_files
    fi
    upload "$1" "$2" "$3"
    else
    extra_argument=""
    if [ "$1" = "davinci" ]; then
    telegram -c -1001426238293 "Nightlies compilation failed!"
    extra_argument="-c -1001426238293"
    elif [ "$1" = "toco" ]; then
    telegram -c -1001443889354 "Nightlies compilation failed!"
    else
    telegram "Nightlies compilation failed for "$1"!"
    extra_argument="-c -1001443889354"
    fi
    telegram "$extra_arguments" "Nightlies compilation for "$1" failed!"
    exit -1
    fi
    }
    @@ -108,11 +98,12 @@ build_result () {
    type="VANILLA"
    fi
    if [ "$result" = "0" ]; then
    telegram -M "*(i)* \`"$(basename $LOCAL_PATH)"\` compilation for \`"$1"\` *completed successfully* on "$HOSTNAME". Build variant: \`$type\`. Build time: \`$time\`."
    echo "$time" > $LOCAL_PATH/.last_build_time
    message="completed successfully"
    else
    telegram -M "*(i)* \`"$(basename $LOCAL_PATH)"\` compilation for \`"$1"\` *failed* on "$HOSTNAME". Build variant: \`$type\`. Build time: \`$time\`."
    message="failed"
    fi
    telegram -M "*(i)* \`"$(basename $LOCAL_PATH)"\` compilation for \`"$1"\` *$message* on "$HOSTNAME". Build variant: \`$type\`. Build time: \`$time\`."
    }

    sign_target_files () {
    @@ -140,12 +131,14 @@ upload () {
    project="$(basename $LOCAL_PATH)"
    if [[ "$2" = "test" ]]; then
    project="$project-experimental"
    rsync -Ph out/target/product/"$1"/lineage-*-"$1".zip ariank16a@frs.sourceforge.net:/home/frs/project/ephedraceae/"$1"/"$project"/
    rsync -Ph out/target/product/"$1"/lineage-*-"$1".zip.sha256sum ariank16a@frs.sourceforge.net:/home/frs/project/ephedraceae/"$1"/"$project"/
    fi

    rsync -Ph out/target/product/"$1"/lineage-*-"$1".zip ariank16a@frs.sourceforge.net:/home/frs/project/ephedraceae/"$1"/"$project"/
    rsync -Ph out/target/product/"$1"/lineage-*-"$1".zip.sha256sum ariank16a@frs.sourceforge.net:/home/frs/project/ephedraceae/"$1"/"$project"/

    if [[ "$2" = "test" ]]; then
    release_experimental "$1" "$project" "$3"
    else
    rsync -Ph out/target/product/"$1"/lineage-*-"$1".zip ariank16a@frs.sourceforge.net:/home/frs/project/ephedraceae/"$1"/"$project"/
    rsync -Ph out/target/product/"$1"/lineage-*-"$1".zip.sha256sum ariank16a@frs.sourceforge.net:/home/frs/project/ephedraceae/"$1"/"$project"/
    release "$1" "$project" "$3"
    fi
    }
    @@ -173,51 +166,39 @@ release () {
    fi
    changelog_link=https://raw.githubusercontent.com/arian-ota/changelog/"$project"/"$device_variant".txt

    extra_arguments=""
    name=""
    group=""
    if [ "$device" = "davinci" ]; then
    telegram -c -1001426238293 -M " \
    *New LineageOS 18.1 build for Mi 9T available!*
    💬 Variant: \`"$type"\`
    *Download*
    ⬇️ ["$project"]("$download_link")
    ✅ [checksum]("$checksum_link")
    🚧 [Changelog]("$changelog_link")
    @StarWarsFlowers
    "
    elif [ "$device" = "toco" ]; then
    telegram -c -1001443889354 -M " \
    *New LineageOS 18.1 build for Mi Note 10 Lite available!*
    name="for Mi 9T "
    group="@StarWarsFlowers"
    extra_arguments="-c -1001426238293"
    elif [ "$device" = "toco" ]; then
    name="for Mi Note 10 Lite "
    group="@lineage\_toco"
    extra_arguments="-c -1001443889354"
    else
    extra_arguments="-c -1001159030901"
    group="#"$device""
    fi
    telegram "$extra_arguments" -M " \
    *New LineageOS 18.1 build "$name"available!*
    💬 Variant: \`"$type"\`
    *Download*
    ⬇️ ["$project"]("$download_link")
    ✅ [checksum]("$checksum_link")
    ✅ [checksum]("$checksum_link"): \`"$checksum"\`
    🚧 [Changelog]("$changelog_link")
    @lineage\_toco
    "
    else
    telegram -c -1001159030901 -N -M " \
    *New build available!*
    🏗️ Project: \`"$project"\`
    📱 Device: \`"$device"\`
    *Download*
    ⬇️ ["$project" for "$device"]("$download_link")
    ✅ [checksum]("$checksum_link"): \`"$checksum"\`
    *Build stats*
    ⌛ Time: \`$time\`
    🗣️ User: \`$USERNAME\`
    💻 Host: \`$HOSTNAME\`
    #$device"
    fi
    "$group"
    "
    update_ota "$device" "$project" "$3"
    make clean
    }
    @@ -249,26 +230,20 @@ release_experimental () {
    telegram -c -1001426238293 -M " \
    *New LineageOS 18.1 build for Mi 9T available!*
    💬 Variant: \`EXPERIMENTAL "$type"\`
    *Download*
    ⬇️ ["$project"]("$download_link")
    ✅ [checksum]("$checksum_link")
    🚧 [Changelog]("$changelog_link")
    @StarWarsFlowers
    "
    elif [ "$1" = "toco" ]; then
    telegram -c -1001426238293 -M " \
    *New LineageOS 18.1 build for Mi Note 10 Lite available!*
    💬 Variant: \`EXPERIMENTAL "$type"\`
    *Download*
    ⬇️ ["$project"]("$download_link")
    ✅ [checksum]("$checksum_link")
    🚧 [Changelog]("$changelog_link")
    @StarWarsFlowers
    "
    fi
  21. ArianK16a revised this gist Nov 4, 2021. 1 changed file with 14 additions and 14 deletions.
    28 changes: 14 additions & 14 deletions lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -129,8 +129,8 @@ sign_target_files () {
    $OUT/signed-target_files-"$filename" \
    $OUT/"$filename"

    checksum=$(md5sum "$OUT"/"$filename" | awk '{print $1}')
    echo ""$checksum" "$filename"" > $OUT/"$filename".md5sum
    checksum=$(sha256sum "$OUT"/"$filename" | awk '{print $1}')
    echo ""$checksum" "$filename"" > $OUT/"$filename".sha256sum
    }
    # upload device releasetype gapps
    upload () {
    @@ -141,11 +141,11 @@ upload () {
    if [[ "$2" = "test" ]]; then
    project="$project-experimental"
    rsync -Ph out/target/product/"$1"/lineage-*-"$1".zip ariank16a@frs.sourceforge.net:/home/frs/project/ephedraceae/"$1"/"$project"/
    rsync -Ph out/target/product/"$1"/lineage-*-"$1".zip.md5sum ariank16a@frs.sourceforge.net:/home/frs/project/ephedraceae/"$1"/"$project"/
    rsync -Ph out/target/product/"$1"/lineage-*-"$1".zip.sha256sum ariank16a@frs.sourceforge.net:/home/frs/project/ephedraceae/"$1"/"$project"/
    release_experimental "$1" "$project" "$3"
    else
    rsync -Ph out/target/product/"$1"/lineage-*-"$1".zip ariank16a@frs.sourceforge.net:/home/frs/project/ephedraceae/"$1"/"$project"/
    rsync -Ph out/target/product/"$1"/lineage-*-"$1".zip.md5sum ariank16a@frs.sourceforge.net:/home/frs/project/ephedraceae/"$1"/"$project"/
    rsync -Ph out/target/product/"$1"/lineage-*-"$1".zip.sha256sum ariank16a@frs.sourceforge.net:/home/frs/project/ephedraceae/"$1"/"$project"/
    release "$1" "$project" "$3"
    fi
    }
    @@ -163,8 +163,8 @@ release () {

    download_link="https://sourceforge.net/projects/ephedraceae/files/"$1"/"$2"/$(basename $(ls out/target/product/"$1"/lineage-*-"$1".zip))"
    time="$(cat $LOCAL_PATH/.last_build_time)"
    md5sum="$(cat "$LOCAL_PATH"/out/target/product/"$1"/lineage-*-"$1".zip.md5sum | awk '{print $1}')"
    md5sum_link="$download_link".md5sum
    checksum="$(cat "$LOCAL_PATH"/out/target/product/"$1"/lineage-*-"$1".zip.sha256sum | awk '{print $1}')"
    checksum_link="$download_link".sha256sum

    if [ "$3" = "gapps" ]; then
    device_variant="$1_gms"
    @@ -181,7 +181,7 @@ release () {
    *Download*
    ⬇️ ["$project"]("$download_link")
    ✅ [md5sum]("$md5sum_link")
    ✅ [checksum]("$checksum_link")
    🚧 [Changelog]("$changelog_link")
    @@ -195,7 +195,7 @@ elif [ "$device" = "toco" ]; then
    *Download*
    ⬇️ ["$project"]("$download_link")
    ✅ [md5sum]("$md5sum_link")
    ✅ [checksum]("$checksum_link")
    🚧 [Changelog]("$changelog_link")
    @@ -209,7 +209,7 @@ elif [ "$device" = "toco" ]; then
    *Download*
    ⬇️ ["$project" for "$device"]("$download_link")
    ✅ [md5sum]("$md5sum_link"): \`"$md5sum"\`
    ✅ [checksum]("$checksum_link"): \`"$checksum"\`
    *Build stats*
    ⌛ Time: \`$time\`
    @@ -235,8 +235,8 @@ release_experimental () {

    download_link="https://sourceforge.net/projects/ephedraceae/files/"$1"/"$2"/$(basename $(ls out/target/product/"$1"/lineage-*-"$1".zip))"
    time="$(cat $LOCAL_PATH/.last_build_time)"
    md5sum="$(cat "$LOCAL_PATH"/out/target/product/"$1"/lineage-*-"$1".zip.md5sum | awk '{print $1}')"
    md5sum_link="$download_link".md5sum
    checksum="$(cat "$LOCAL_PATH"/out/target/product/"$1"/lineage-*-"$1".zip.sha256sum | awk '{print $1}')"
    checksum_link="$download_link".sha256sum

    if [ "$3" = "gapps" ]; then
    device_variant="$1_gms"
    @@ -253,7 +253,7 @@ release_experimental () {
    *Download*
    ⬇️ ["$project"]("$download_link")
    ✅ [md5sum]("$md5sum_link")
    ✅ [checksum]("$checksum_link")
    🚧 [Changelog]("$changelog_link")
    @StarWarsFlowers
    @@ -266,7 +266,7 @@ release_experimental () {
    *Download*
    ⬇️ ["$project"]("$download_link")
    ✅ [md5sum]("$md5sum_link")
    ✅ [checksum]("$checksum_link")
    🚧 [Changelog]("$changelog_link")
    @StarWarsFlowers
    @@ -302,7 +302,7 @@ update_ota () {
    filename="${filename#*=}"
    filename=lineage-"$filename".zip

    id=$(cat "$OUT"/"$filename".md5sum | awk '{print $1}')
    id=$(cat "$OUT"/"$filename".sha256sum | awk '{print $1}')

    romtype=$(cat "$OUT"/system/build.prop | grep ro.lineage.releasetype=)
    romtype="${romtype#*=}"
  22. ArianK16a revised this gist Jun 30, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -130,7 +130,7 @@ sign_target_files () {
    $OUT/"$filename"

    checksum=$(md5sum "$OUT"/"$filename" | awk '{print $1}')
    echo "$checksum $filename" > "$filename".md5sum
    echo ""$checksum" "$filename"" > $OUT/"$filename".md5sum
    }
    # upload device releasetype gapps
    upload () {
  23. ArianK16a revised this gist Jun 30, 2021. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -129,8 +129,8 @@ sign_target_files () {
    $OUT/signed-target_files-"$filename" \
    $OUT/"$filename"

    checksum=$(md5sum "$OUT"/"$filename")
    echo ""$checksum" "$filename"" > "$filename".md5sum
    checksum=$(md5sum "$OUT"/"$filename" | awk '{print $1}')
    echo "$checksum $filename" > "$filename".md5sum
    }
    # upload device releasetype gapps
    upload () {
  24. ArianK16a revised this gist Jun 30, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -199,7 +199,7 @@ elif [ "$device" = "toco" ]; then
    🚧 [Changelog]("$changelog_link")
    @lineage_toco
    @lineage\_toco
    "
    else
    telegram -c -1001159030901 -N -M " \
  25. ArianK16a revised this gist Jun 24, 2021. 1 changed file with 0 additions and 14 deletions.
    14 changes: 0 additions & 14 deletions lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -50,17 +50,6 @@ prepare_gapps () {
    export TARGET_UNOFFICIAL_BUILD_ID=GMS
    }

    # Temporary, until we use same common tree
    prepare_toco () {
    rm -rf device/xiaomi/sm6150-common
    git clone https://github.com/xiaomi-sm6150/android_device_xiaomi_sm6150-common.git -b toco/lineage-18.1-3 device/xiaomi/sm6150-common
    rm -rf vendor/xiaomi
    git clone https://github.com/xiaomi-sm6150/android_vendor_xiaomi.git -b toco/lineage-18.1 vendor/xiaomi
    rm -rf kernel/xiaomi/sm6150
    git clone https://github.com/ArianK16a/android_kernel_xiaomi_sm6150.git -b toco_lineage-18.1 kernel/xiaomi/sm6150

    }

    # build device releasetype gapps
    build () {
    prepare
    @@ -71,9 +60,6 @@ build () {
    else
    prepare_vanilla
    fi
    if [ "$1" = "toco" ]; then
    prepare_toco
    fi
    breakfast "$1"
    make clean
    # make installclean
  26. ArianK16a revised this gist May 3, 2021. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -353,8 +353,7 @@ update_ota () {
    }" > "$device".json
    git add "$device".json
    git commit -m "$device: Automatic OTA update"
    # Disable OTA for now due to changed signature
    # git push git@github.com:arian-ota/ota.git HEAD:"$2"
    git push git@github.com:arian-ota/ota.git HEAD:"$2"
    cd $LOCAL_PATH

    update_changelog $1 $2 $3
  27. ArianK16a revised this gist Apr 2, 2021. No changes.
  28. ArianK16a revised this gist Apr 2, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -73,7 +73,7 @@ build () {
    fi
    if [ "$1" = "toco" ]; then
    prepare_toco
    #fi
    fi
    breakfast "$1"
    make clean
    # make installclean
  29. ArianK16a revised this gist Apr 2, 2021. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -71,12 +71,12 @@ build () {
    else
    prepare_vanilla
    fi
    #if [ "$1" = "toco" ]; then
    # prepare_toco
    if [ "$1" = "toco" ]; then
    prepare_toco
    #fi
    breakfast "$1"
    # make clean
    make installclean
    make clean
    # make installclean
    telegram -N -M "*(i)* \`"$(basename $LOCAL_PATH)"\` compilation for \`"$1"\` *started* on "$HOSTNAME"."
    build_start=$(date +"%s")
    if [ signed ]; then
    @@ -99,7 +99,7 @@ build () {
    else
    telegram "Nightlies compilation failed for "$1"!"
    fi
    //exit -1
    exit -1
    fi
    }

    @@ -233,7 +233,7 @@ elif [ "$device" = "toco" ]; then
    #$device"
    fi
    update_ota "$device" "$project" "$3"
    # make clean
    make clean
    }

    # release device project gapps
  30. ArianK16a revised this gist Apr 2, 2021. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion lineage-18.1.sh
    Original file line number Diff line number Diff line change
    @@ -353,7 +353,8 @@ update_ota () {
    }" > "$device".json
    git add "$device".json
    git commit -m "$device: Automatic OTA update"
    git push git@github.com:arian-ota/ota.git HEAD:"$2"
    # Disable OTA for now due to changed signature
    # git push git@github.com:arian-ota/ota.git HEAD:"$2"
    cd $LOCAL_PATH

    update_changelog $1 $2 $3