summaryrefslogtreecommitdiff
path: root/script/trees
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-06-30 21:31:01 +0100
committerLeah Rowe <leah@libreboot.org>2024-06-30 21:33:30 +0100
commit2b49714a6ae2920a4de4131768bffc2d1d40a666 (patch)
tree5b3bdd0562f22ed5f76b07ff8259870feb3376b7 /script/trees
parentb7f12ade03dc53788ed21189fd355582eb9490bb (diff)
trees: handle all projects if project undefined
e.g. ./update trees -f if passed, this command would download every tree similarly, the -c option can be used in this way. this solves a longstanding issue: on the current, much more efficient design, it was not possible to systematically clean every project. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script/trees')
-rwxr-xr-xscript/trees8
1 files changed, 6 insertions, 2 deletions
diff --git a/script/trees b/script/trees
index 2b7dfaf0..10c08d1e 100755
--- a/script/trees
+++ b/script/trees
@@ -31,11 +31,15 @@ main()
-n) mode="nconfig" ;;
*) $err "invalid option '-$option'" ;;
esac
- [ -n "${OPTARG+x}" ] || $err "OPTARG not set"
+ [ -z "${OPTARG+x}" ] && shift 1 && break
project="${OPTARG#src/}"; shift 2
done
[ -z "$_f" ] && $err "missing flag (-m/-u/-b/-c/-x/-f/-s/-l/-n)"
- [ -z "$project" ] && $err "project name not specified"
+ [ -z "$project" ] && for p in $(ls -1 config/git); do
+ ./update trees $_f "$p" || $err "!./update trees $_f $p"
+ [ "$XBMK_RELEASE" != "y" ] || singletree "$p" || \
+ x_ rm Rf "src/$p/$p"; continue
+ done && return 0
[ -f "config/git/$project/pkg.cfg" ] || $err "'$project' not defined"