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

Commit 853a2566 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Browser: abort rebase if any in progress

parent ddabd570
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -202,11 +202,17 @@ if [ ! -d "$chromium_dir/src" ]; then
fi

if [ $gsync -eq 1 ]; then
    if [ -d "$chromium_dir/src/.git/rebase-apply" ]; then
        rm -fr "$chromium_dir/src/.git/rebase-apply"
    fi
    find "$chromium_dir/src/.git" -name "*.lock" -delete
    if [ ! -z $(find $chromium_dir/src/.git -name "*.lock") ]; then
    cd $chromium_dir/src
    # Check if a rebase is in progress
    if [ -d "$(git rev-parse --git-dir)/rebase-apply" ] || [ -d "$(git rev-parse --git-dir)/rebase-merge" ]; then
      git am --skip 2>/dev/null || true
      git rebase --abort 2>/dev/null || true
      echo ">> [$(date)] Rebase aborted."
    fi
    find ".git" -name "*.lock" -delete
    if [ ! -z $(find .git -name "*.lock") ]; then
        echo ">> [$(date)] Re-init chromium."
        cd ${root_dir}
        rm -fr $chromium_dir/src
        init_repo
    fi