fix again

This commit is contained in:
emmett1
2019-06-15 15:41:07 +08:00
parent bbaf66a137
commit d573d52e50
3 changed files with 4 additions and 4 deletions

4
pkgadd
View File

@@ -229,7 +229,7 @@ if [ ! "$IGNORE_CONFLICT" ]; then
fi
if [ -e "$ROOT_DIR/$line" ] || [ -L "$ROOT_DIR/$line" ]; then
if [ "$UPGRADE_PKG" ] || [ "$REINSTALL_PKG" ]; then
if ! grep -Fx "$line" "$INDEX_DIR/$name/.files"; then
if [ ! "$(grep -Fx "$line" "$INDEX_DIR/$name/.files")" ]; then
echo "$line"
conflictedfile=yes
fi
@@ -284,7 +284,7 @@ if [ "$UPGRADE_PKG" ] || [ "$REINSTALL_PKG" ]; then
rm "$ROOT_DIR/$line" &>/dev/null
done
grep '/$' $TMP_PKGADD_RMLIST | tac | while read -r line; do
if ! grep -Rqx "$line" "$INDEX_DIR"/*/.files | grep -v "$INDEX_DIR"/$name/.files; then
if [ ! "$(grep -Rx "$line" "$INDEX_DIR"/*/.files | grep -v "$INDEX_DIR"/$name/.files)" ]; then
[ "$VERBOSE_INSTALL" = yes ] && echo "- $line"
rmdir "$ROOT_DIR/$line" &>/dev/null
fi

2
pkgdel
View File

@@ -175,7 +175,7 @@ while read -r line; do
done < <(tac $INDEX_DIR/$name/.files | grep -v '/$')
while read -r line; do
if grep -Rqx "$line" "$INDEX_DIR"/*/.files | grep -v "$INDEX_DIR"/$name/.files; then
if [ ! "$(grep -Rx "$line" "$INDEX_DIR"/*/.files | grep -v "$INDEX_DIR"/$name/.files)" ]; then
if [ -d "$ROOT_DIR/$line" ]; then
[ "$VERBOSE_REMOVE" = yes ] && echo "- $line"
rmdir "$ROOT_DIR/$line"

View File

@@ -54,7 +54,7 @@ pushd / >/dev/null
libpath=$(ldd "$LINE" | grep -v "not found" | grep -w "$i" | awk '{print $3}')
if [ "$libpath" ]; then
FILEPATH=$(readlink -f $libpath)
FILENAME=$(sed -e '1s/^.//' $FILEPATH)
FILENAME=$(echo $FILEPATH | sed -e '1s/^.//')
PKG_NAME=$(basename $(dirname $(grep -Rx $FILENAME $INDEX_DIR | cut -d ':' -f1)))
if [ "$PKG_NAME" != $1 ]; then
if ! echo "$deppkg" | grep -qw "$PKG_NAME"; then