aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremmett1 <emmett1.2miligrams@protonmail.com>2024-05-22 00:06:31 +0800
committeremmett1 <emmett1.2miligrams@protonmail.com>2024-05-22 00:06:31 +0800
commit8d264397abd36ea832a907f6e88b57f89570cc56 (patch)
tree7912fe629490a459fc12ee3c035678f95c781f05
parent33d88ba4a9ae46e794fc9ddbed5bcf3273a00c7c (diff)
downloadspm-8d264397abd36ea832a907f6e88b57f89570cc56.tar.gz
spm-8d264397abd36ea832a907f6e88b57f89570cc56.zip
updated
-rwxr-xr-xspm7
1 files changed, 5 insertions, 2 deletions
diff --git a/spm b/spm
index 6bde76f..fcc1c60 100755
--- a/spm
+++ b/spm
@@ -113,7 +113,7 @@ spm_install() {
if [ -f "$SPMDIR/conflict.list" ] && [ ! "$SPM_FORCEINSTALL" ]; then
cat "$SPMDIR/conflict.list" | while read -r line; do
- p=$(grep $line $PKGDB/* | awk -F : '{print $1}' | head -n1)
+ p=$(grep -x $line $PKGDB/* | awk -F : '{print $1}' | head -n1)
p=${p##*/}
echo "${p:-(none)}: $line"
done
@@ -252,7 +252,10 @@ spm_allinstalled() {
spm_listfiles() {
checkdbdir
needarg $1
- tail -n+2 $PKGDB/$1
+ if [ ! -s $PKGDB/$1 ]; then
+ msgerr "Package '$1' not installed."
+ fi
+ tail -n+2 $PKGDB/$1
exit 0
}