Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 132a14e5 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

cromite: Fork chromium with history

- Forking without history is taking time and getting stuck
parent 6b646391
Loading
Loading
Loading
Loading
Loading
+4 −13
Original line number Diff line number Diff line
@@ -11,7 +11,6 @@ chromium_version=$(head -n 1 "${root_dir}/cromite/build/RELEASE")
chromium_code=$(echo "$chromium_version" | tr -d '.' | cut -c5-)
clean=0
gsync=0
history=1
arch=""

usage() {
@@ -22,7 +21,7 @@ usage() {
    echo "    -a <arch> Build specified arch"
    echo "    -c Clean"
    echo "    -h Show this message"
    echo "    -s Sync without history"
    echo "    -s Sync with history"
    echo
    exit 1
}
@@ -103,11 +102,7 @@ patch() {
sync() {
    echo ">> [$(date)] Syncing chromium $chromium_version"
    cd $chromium_dir
    if [ $history -eq 1 ]; then
    yes | gclient sync -D -R -r $chromium_version
    else
        yes | gclient sync --no-history -D -R -r $chromium_version
    fi
    patch
}

@@ -115,11 +110,7 @@ init_repo(){
    echo ">> [$(date)] Init chromium $chromium_version"
    cd $chromium_dir
    rm -rf .gclient*
    if [ $history -eq 1 ]; then
    fetch android
    else
        fetch --no-history android
    fi
}

while getopts ":a:chr:s" opt; do
@@ -127,7 +118,7 @@ while getopts ":a:chr:s" opt; do
    a) arch="$OPTARG" ;;
    c) clean=1 ;;
    h) usage ;;
    s) gsync=1 && history=0 ;;
    s) gsync=1 ;;
    :)
        echo "Option -$OPTARG requires an argument"
        echo