aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2020-02-01 08:20:41 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2020-02-01 08:20:41 +0000
commitdbaedc1d2060764a004ef9d0263689833cf4a8c7 (patch)
tree210541f0b1362711eb45381c966dfc4657231c7e
parentc82a2f412731c99422102cab31dd4c8207cb9a31 (diff)
downloadcpt-dbaedc1d2060764a004ef9d0263689833cf4a8c7.tar.gz
kiss: show error message on mv fail. Closes #103
FossilOrigin-Name: 0429e0b3d21b2b516118377e84052ff5d72a834c6c785a57401513ba33e28a95
-rwxr-xr-xkiss3
1 files changed, 2 insertions, 1 deletions
diff --git a/kiss b/kiss
index 54ee9f8..3b7e318 100755
--- a/kiss
+++ b/kiss
@@ -733,7 +733,8 @@ pkg_conflicts() {
# Move the conflicting file to the choices directory
# and name it according to the format above.
mv -f "$tar_dir/$p_name/$con" \
- "$tar_dir/$p_name/$cho_dir/$p_name$con_name"
+ "$tar_dir/$p_name/$cho_dir/$p_name$con_name" 2>/dev/null ||
+ die "File must be in ${con%/*} and not a symlink to it"
regex_escape "$con" "/$cho_dir/$p_name$con_name"