summaryrefslogtreecommitdiff
path: root/scripts/package-build/linux-kernel
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/package-build/linux-kernel')
-rwxr-xr-xscripts/package-build/linux-kernel/build.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/package-build/linux-kernel/build.py b/scripts/package-build/linux-kernel/build.py
index 6fa6af35..46a60fd7 100755
--- a/scripts/package-build/linux-kernel/build.py
+++ b/scripts/package-build/linux-kernel/build.py
@@ -18,6 +18,7 @@
import datetime
import glob
import shutil
+import sys
import toml
import os
import subprocess
@@ -60,8 +61,12 @@ def clone_or_update_repo(repo_dir: Path, scm_url: str, commit_id: str) -> None:
run(['git', 'checkout', commit_id], cwd=repo_dir, check=True)
#run(['git', 'pull'], cwd=repo_dir, check=True)
else:
- run(['git', 'clone', scm_url, str(repo_dir)], check=True)
- run(['git', 'checkout', commit_id], cwd=repo_dir, check=True)
+ try:
+ run(['git', 'clone', scm_url, str(repo_dir)], check=True)
+ run(['git', 'checkout', commit_id], cwd=repo_dir, check=True)
+ except CalledProcessError as e:
+ print(f"❌ Failed to clone or checkout: {e}")
+ sys.exit(1)
def create_tarball(package_name, source_dir=None):