diff options
| author | Leah Rowe <leah@libreboot.org> | 2025-05-15 01:03:14 +0100 | 
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2025-05-15 02:12:04 +0100 | 
| commit | 208dfc89bd583f4d8b757ca34e6f6a85538d5e48 (patch) | |
| tree | b39c1baff24c9dbeee3a1b91d754176a9608af14 | |
| parent | 46f42291d3c1e9a3e5b34b6bd727f94cd512bc64 (diff) | |
get.sh: simplify nuke()
more specifically, re-write it so that it can be called with fx_
this means that the single-tree check for nuke.list can be made
much simpler
Signed-off-by: Leah Rowe <leah@libreboot.org>
| -rw-r--r-- | include/get.sh | 14 | 
1 files changed, 5 insertions, 9 deletions
| diff --git a/include/get.sh b/include/get.sh index 7d728796..156d2b87 100644 --- a/include/get.sh +++ b/include/get.sh @@ -15,7 +15,7 @@ fetch_targets()  	printf "Creating %s tree %s\n" "$project" "$tree"  	git_prep "$url" "$bkup_url" "$xbmkpwd/$configdir/$tree/patches" \  	    "src/$project/$tree" with_submodules -	nuke "$project/$tree" "$project/$tree" +	( fx_ nuke find "$xbmkpwd/config" -type f -name "nuke.list" ) || exit 1  }  fetch_project() @@ -31,10 +31,7 @@ fetch_project()  		x_ ./mk -f $d  	done  	clone_project - -	for x in config/git/*; do -		[ -d "$x" ] && nuke "${x##*/}" "src/${x##*/}" 2>/dev/null; : -	done; : +	( fx_ nuke find "$xbmkpwd/config" -type f -name "nuke.list" ) || exit 1  }  clone_project() @@ -166,8 +163,7 @@ tmpclone()  nuke()  { -	e "config/${1%/}/nuke.list" f missing || while read -r nukefile; do -		rmf="src/${2%/}/$nukefile" && [ -L "$rmf" ] && continue -		e "$rmf" e missing || x_ rm -Rf "$rmf" -	done < "config/${1%/}/nuke.list"; : +	rdir="${1#"$xbmkpwd/config/"}" && [ -d "$xbmkpwd/src/${rdir%/*}" ] && \ +	    x_ cd "$xbmkpwd/src/${rdir%/*}" && \ +	    dx_ "[ -L \"\$fx\" ] || x_ rm -Rf" "$1"; :  } | 
