summaryrefslogtreecommitdiff
path: root/include/get.sh
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-11-15 16:51:10 +0000
committerLeah Rowe <leah@libreboot.org>2025-11-15 16:51:10 +0000
commit9d6af0063b627a26e678b646179c2aaeb063e0d6 (patch)
tree78e22303dd27df658394b2d4fb1c3e49c7de8652 /include/get.sh
parentd7869a56f52540f833c04c6ece6cbd42dc24b89d (diff)
get.sh: reduce indentation in clone_project
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/get.sh')
-rw-r--r--include/get.sh17
1 files changed, 9 insertions, 8 deletions
diff --git a/include/get.sh b/include/get.sh
index 9ab6956d..df7e2312 100644
--- a/include/get.sh
+++ b/include/get.sh
@@ -53,17 +53,18 @@ fetch_project()
clone_project()
{
- if singletree "$project"; then
- loc="src/$project"
+ if ! singletree "$project"; then
+ return 0
+ fi
- if [ -d "$loc" ]; then
- return 0
- fi
+ loc="src/$project"
- remkdir "${tmpgit%/*}"
- git_prep "$url" "$bkup_url" \
- "$xbmkpwd/config/$project/patches" "$loc"
+ if [ -d "$loc" ]; then
+ return 0
fi
+
+ remkdir "${tmpgit%/*}"
+ git_prep "$url" "$bkup_url" "$xbmkpwd/config/$project/patches" "$loc"
}
git_prep()