diff options
author | merakor <cem@ckyln.com> | 2020-05-27 17:09:18 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2020-05-27 17:09:18 +0000 |
commit | c62f09075ee4049533ca8aa2bf19028b3ae5c7e3 (patch) | |
tree | e16b8dc9e34cd95374e9b65f908e707773626dcc /contrib/kiss-link | |
parent | bc3340c33d20604c5b596a736e90cc15f55f3ccd (diff) | |
download | cpt-c62f09075ee4049533ca8aa2bf19028b3ae5c7e3.tar.gz |
kiss-link: remove the file if it is a directory
FossilOrigin-Name: 51d37a11c7b9b61b4069613a7eb5d613ddd7ee2c9b53f0ff20f9270967421bdd
Diffstat (limited to 'contrib/kiss-link')
-rwxr-xr-x | contrib/kiss-link | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/kiss-link b/contrib/kiss-link index 1f4b95c..2728fea 100755 --- a/contrib/kiss-link +++ b/contrib/kiss-link @@ -12,6 +12,7 @@ oPKG="$(kiss s "$PKG" | grep -v "^$PWD\$\|/var/db/kiss/installed/$PKG" | sed 1q) for file in "$@" ; do [ -e "${oPKG:?}/$file" ] + [ -d "$file" ] && rm -rf "$file" ln -sf "$oPKG/$file" "$file" printf 'linked %s to %s\n' "$oPKG/$file" "$PWD/$file" done |