Compare commits
2 Commits
7fbcb7be95
...
13d4b6d3c7
Author | SHA1 | Date |
---|---|---|
Leah Rowe | 13d4b6d3c7 | |
Leah Rowe | f6cbc501c1 |
1
build
1
build
|
@ -139,7 +139,6 @@ fetch_trees()
|
||||||
[ ! -f "$x" ] || [ -L "$xp" ] || x_ rm -Rf "src/$xp/$xp"
|
[ ! -f "$x" ] || [ -L "$xp" ] || x_ rm -Rf "src/$xp/$xp"
|
||||||
done
|
done
|
||||||
rmgit .
|
rmgit .
|
||||||
rm -Rf tmp .git src/u-boot/*/test/lib/strlcat.c || $err "$_xm !rm"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fail()
|
fail()
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
test/lib/strlcat.c
|
|
@ -46,6 +46,7 @@ prepare_new_tree()
|
||||||
cp -R "src/$project/$project" "$tmpgit" || \
|
cp -R "src/$project/$project" "$tmpgit" || \
|
||||||
$err "prepare_new_tree $project/$tree: can't make tmpclone"
|
$err "prepare_new_tree $project/$tree: can't make tmpclone"
|
||||||
git_prep "$PWD/$cfgsdir/$tree/patches" "src/$project/$tree" "update"
|
git_prep "$PWD/$cfgsdir/$tree/patches" "src/$project/$tree" "update"
|
||||||
|
nuke "$project/$tree" "$project/$tree"
|
||||||
}
|
}
|
||||||
|
|
||||||
fetch_project_repo()
|
fetch_project_repo()
|
||||||
|
@ -61,6 +62,10 @@ fetch_project_repo()
|
||||||
x_ ./update trees -f $d
|
x_ ./update trees -f $d
|
||||||
done
|
done
|
||||||
rm -Rf "$tmpgit" || $err "fetch_repo: !rm -Rf $tmpgit"
|
rm -Rf "$tmpgit" || $err "fetch_repo: !rm -Rf $tmpgit"
|
||||||
|
|
||||||
|
for x in config/git/*; do
|
||||||
|
[ -f "$x" ] && nuke "${x##*/}" "src/${x##*/}"; continue
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
clone_project()
|
clone_project()
|
||||||
|
@ -181,3 +186,32 @@ move_repo()
|
||||||
[ -n "$xtree" ] && [ ! -d "src/coreboot/$xtree" ] && \
|
[ -n "$xtree" ] && [ ! -d "src/coreboot/$xtree" ] && \
|
||||||
x_ ./update trees -f coreboot "$xtree"; return 0
|
x_ ./update trees -f coreboot "$xtree"; return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# can delete from multi- and single-tree projects.
|
||||||
|
# called from script/trees when downloading sources.
|
||||||
|
nuke()
|
||||||
|
{
|
||||||
|
del="n"
|
||||||
|
pjcfgdir="${1%/}"
|
||||||
|
pjsrcdir="${2%/}"
|
||||||
|
pjsrcdir="${pjsrcdir#src/}"
|
||||||
|
[ ! -f "config/$pjcfgdir/nuke.list" ] && return 0
|
||||||
|
|
||||||
|
while read -r nukefile; do
|
||||||
|
rmf="$(realpath "src/$pjsrcdir/$nukefile" 2>/dev/null)" || \
|
||||||
|
continue
|
||||||
|
[ -L "$rmf" ] && continue # we will delete the actual file
|
||||||
|
[ "${rmf#"$PWD/src/$pjsrcdir"}" = "$rmf" ] && continue
|
||||||
|
[ "${rmf#"$PWD/src/"}" = "$pjsrcdir" ] && continue
|
||||||
|
rmf="${rmf#"$PWD/"}"
|
||||||
|
[ -e "$rmf" ] || continue
|
||||||
|
del="y"
|
||||||
|
rm -Rf "$rmf" || $err "$nuke pjcfgdir: can't rm \"$nukefile\""
|
||||||
|
printf "nuke %s: deleted \"%s\"\n" "$pjcfgdir" "$rmf"
|
||||||
|
done < "config/$pjcfgdir/nuke.list"
|
||||||
|
|
||||||
|
[ "${del}" = "y" ] && return 0
|
||||||
|
printf "nuke %s: no defined files exist in dir, src/%s\n" 1>&2 \
|
||||||
|
"$pjcfgdir" "$pjsrcdir"
|
||||||
|
printf "(this is not an error)\n" 1>&2
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue