aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2020-01-30 09:15:34 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2020-01-30 09:15:34 +0000
commit5ddac85ea1a2773643e54df4eb37d15a7eb9d304 (patch)
treeafcaca68ab779755c16b6ea408765052baed8c7f
parent36258fafee6e51ec7a063421040f8010245c957b (diff)
downloadcpt-5ddac85ea1a2773643e54df4eb37d15a7eb9d304.tar.gz
kiss: Revert to sed -i
FossilOrigin-Name: 414847d802196703247150b73f6183f2d4403f9df96e292d24a7664c414426ec
-rwxr-xr-xkiss11
1 files changed, 4 insertions, 7 deletions
diff --git a/kiss b/kiss
index 90db137..c282444 100755
--- a/kiss
+++ b/kiss
@@ -737,12 +737,11 @@ pkg_conflicts() {
"$tar_dir/$p_name/$cho_dir/$p_name$con_name"
regex_escape "$con" "/$cho_dir/$p_name$con_name"
- mani=$tar_dir/$p_name/$pkg_db/$p_name/manifest
+ mani=
# Rewrite the package's manifest to update its location
# to its new spot (and name) in the choices directory.
- sed "s/^$sea\$/$rep/" "$mani" > "$mani.1"
- mv -f "$mani.1" "$mani"
+ sed -i "s/^$sea\$/$rep/" "$tar_dir/$p_name/$pkg_db/$p_name/manifest"
done
else
if "$grep" -Fxf "$cac_dir/$pid-m" -- "$@"; then
@@ -789,8 +788,7 @@ pkg_swap() {
# Convert the current owner to an alternative and rewrite
# its manifest file to reflect this.
cp -f "$2" "$pkg_owns>${alt#*>}"
- sed "s/^$sea\$/$rep/" "$mani" > "$mani.1"
- mv -f "$mani.1" "$mani"
+ sed -i "s/^$sea\$/$rep/" "../installed/$pkg_owns/manifest"
fi
regex_escape "$PWD/$alt" "$2"
@@ -799,8 +797,7 @@ pkg_swap() {
# Convert the desired alternative to a real file and rewrite
# the manifest file to reflect this. The reverse of above.
mv -f "$alt" "$2"
- sed "s/^$sea\$/$rep/" "$mani" > "$mani.1"
- mv -f "$mani.1" "$mani"
+ sed -i "s/^$sea\$/$rep/" "../installed/$1/manifest"
}
pkg_remove() {