diff options
| author | emmett1 <emmett1.2miligrams@protonmail.com> | 2024-05-22 00:06:31 +0800 |
|---|---|---|
| committer | emmett1 <emmett1.2miligrams@protonmail.com> | 2024-05-22 00:06:31 +0800 |
| commit | 8d264397abd36ea832a907f6e88b57f89570cc56 (patch) | |
| tree | 7912fe629490a459fc12ee3c035678f95c781f05 | |
| parent | 33d88ba4a9ae46e794fc9ddbed5bcf3273a00c7c (diff) | |
| download | spm-8d264397abd36ea832a907f6e88b57f89570cc56.tar.gz spm-8d264397abd36ea832a907f6e88b57f89570cc56.zip | |
updated
| -rwxr-xr-x | spm | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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 } |