aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbopkglint.d/05-basic-sanity.t.sh11
1 files changed, 2 insertions, 9 deletions
diff --git a/sbopkglint.d/05-basic-sanity.t.sh b/sbopkglint.d/05-basic-sanity.t.sh
index 1a03004..612b107 100644
--- a/sbopkglint.d/05-basic-sanity.t.sh
+++ b/sbopkglint.d/05-basic-sanity.t.sh
@@ -151,15 +151,8 @@ for i in $badfiles; do
[ -e "$i" ] && warn "forbidden file: $i"
done
-badlinks="$( find -L . -type l )"
-[ -n "$badlinks" ] && for i in $badlinks; do
- target="$( readlink "$i" )"
- case "$target" in
- /*) abslinks+="$i " ;;
- *) brokenlinks+="$i " ;;
- esac
-done
+abslinks="$( find . -type l -lname '/*' )"
+brokenlinks="$( find -L . -type l \! -lname '/*' )"
[ -n "$abslinks" ] && warn "package contains absolute symlinks (should be relative):" && ls -ld $abslinks
[ -n "$brokenlinks" ] && warn "package contains broken symlinks:" && ls -ld $brokenlinks
-