A linux shell script to check if your apps need updating

Wouldn’t it be nice if you could check all your apps’ status whether they needed updating or not? Here’s one shell script you could deploy on your linux servers:

for app in apps/*; do
    if [ -d "$app/.git" ]; then
        echo -e "\nChecking: $(basename $app)"
        cd "$app"
        # Fetch the latest remote repository data quietly
        git fetch --quiet --all
        
        # Count commits between local HEAD and upstream tracking branch
        BEHIND=$(git rev-list --count HEAD..@{u} 2>/dev/null || echo 0)
        
        if [ "$BEHIND" -gt 0 ]; then
            echo "⚠️  Needs Update ($BEHIND commits behind)"
        else
            echo "✅ Up to date"
        fi
        cd ../../
    fi
done

Copy this to a file under your frappe framework folder and assign execution right to this file and execute.