summaryrefslogtreecommitdiff
path: root/bin/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'bin/pkg')
-rwxr-xr-xbin/pkg10
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/pkg b/bin/pkg
index 8e81363..fdd851f 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -389,9 +389,13 @@ function populate_collected {
}
if [[ -d bin ]] {
for i in bin/*(*); {
- if [[ $(readlink $HOME/$i) != "../$1/$i" ]] {
- rm -f $HOME/$i
- ln -s ../${PDIR//$HOME\/}/$1/$i $HOME/$i
+ if [[ -L $HOME/$i || ! -e $HOME/$i ]] {
+ if [[ $(readlink $HOME/$i) != "../$1/$i" ]] {
+ rm -f $HOME/$i
+ ln -s ../${PDIR//$HOME\/}/$1/$i $HOME/$i
+ }
+ } else {
+ warn "populate_collected: Not updating ~/$i since it's not a symlink\n"
}
}
}