summaryrefslogtreecommitdiff
path: root/download
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2022-11-11 21:38:12 +0000
committerGogs <gogitservice@gmail.com>2022-11-11 21:38:12 +0000
commitb5c25efed46f0a9121023997c6758eda5c3f5017 (patch)
tree973bda08e84b61b8fee442a94db1bc62bd6d818a /download
parentfbbb5bc616b08a5cd747735b0612fd0f0046c7fe (diff)
parent61ac6c3f0b26deadc2fb8355a8dd0d25b29baacd (diff)
Merge branch 'u-boot-chromebooks' of alpernebbi/lbmk into master
Diffstat (limited to 'download')
-rwxr-xr-xdownload13
1 files changed, 12 insertions, 1 deletions
diff --git a/download b/download
index 7d975d68..e5dcb3d6 100755
--- a/download
+++ b/download
@@ -6,6 +6,7 @@
# Copyright (C) 2015 Patrick "P. J." McDermott <pj@pehjota.net>
# Copyright (C) 2015, 2016 Klemens Nanni <contact@autoboot.org>
# Copyright (C) 2022, Caleb La Grange <thonkpeasant@protonmail.com>
+# Copyright (C) 2022 Alper Nebi Yasak <alpernebiyasak@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -31,8 +32,12 @@ set -u -e
# set this when you want to modify each coreboot tree
# for example, you want to test custom patches
# NODELETE= ./download coreboot
+deletegit="true"
deleteblobs="true"
-[ "x${NODELETE+set}" = 'xset' ] && deleteblobs="false"
+if [ "x${NODELETE+set}" = 'xset' ]; then
+ [ "x${NODELETE:-all}" = "xgit" ] && deletegit="false"
+ [ "x${NODELETE:-all}" = "xall" ] && deleteblobs="false" && deletegit="false"
+fi
rm -f "build_error"
@@ -89,6 +94,8 @@ if [ "${program}" = "all" ]; then
if [ -f "${downloadProgram}" ]; then
if [ "${deleteblobs}" = "false" ]; then
NODELETE= "${downloadProgram}"
+ elif [ "${deletegit}" = "false" ]; then
+ NODELETE=git "${downloadProgram}"
else
"${downloadProgram}"
fi
@@ -103,12 +110,16 @@ fi
if [ $# -lt 1 ]; then
if [ "${deleteblobs}" = "false" ]; then
NODELETE= "${download}/${program}"
+ elif [ "${deletegit}" = "false" ]; then
+ NODELETE=git "${download}/${program}"
else
"${download}/${program}"
fi
else
if [ "${deleteblobs}" = "false" ]; then
NODELETE= "${download}/${program}" $@
+ elif [ "${deletegit}" = "false" ]; then
+ NODELETE=git "${download}/${program}" $@
else
"${download}/${program}" $@
fi