mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-12-25 00:20:05 -07:00
kiss: use temporary file for fix-deps
This commit is contained in:
parent
f644275c62
commit
a68608dfd1
15
kiss
15
kiss
@ -593,9 +593,8 @@ pkg_fix_deps() {
|
|||||||
set +f
|
set +f
|
||||||
set -f -- "$sys_db/"*/manifest
|
set -f -- "$sys_db/"*/manifest
|
||||||
|
|
||||||
: >> depends
|
tmp_file_copy "${PWD##*/}" depends depends
|
||||||
|
tmp_file "${PWD##*/}" depends-fixed
|
||||||
tmp_file "${PWD##*/}" fix-depends
|
|
||||||
|
|
||||||
find "$pkg_dir/${PWD##*/}/" -type f 2>/dev/null |
|
find "$pkg_dir/${PWD##*/}/" -type f 2>/dev/null |
|
||||||
|
|
||||||
@ -647,16 +646,14 @@ pkg_fix_deps() {
|
|||||||
done <<EOF || :
|
done <<EOF || :
|
||||||
$elf_buf
|
$elf_buf
|
||||||
EOF
|
EOF
|
||||||
done | sort -uk1,1 depends - > "$_tmp_file"
|
done | sort -uk1,1 "$_tmp_file_pre" - > "$_tmp_file"
|
||||||
|
|
||||||
# If the depends file was modified, show a diff and replace it.
|
# If the depends file was modified, show a diff and replace it.
|
||||||
if [ -s "$_tmp_file" ]; then
|
! [ -s "$_tmp_file" ] || {
|
||||||
diff -U 3 depends - < "$_tmp_file" 2>/dev/null || :
|
diff -U 3 "$_tmp_file_pre" "$_tmp_file" 2>/dev/null || :
|
||||||
mv -f "$_tmp_file" depends
|
mv -f "$_tmp_file" depends
|
||||||
pkg_manifest "${PWD##*/}"
|
pkg_manifest "${PWD##*/}"
|
||||||
else
|
}
|
||||||
rm -f depends
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_manifest() {
|
pkg_manifest() {
|
||||||
|
Loading…
Reference in New Issue
Block a user