mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
* Oops, that last commit had some debug stuff in it. Removed it and added
--help and --version command line flags to contrib/pacsearch.
This commit is contained in:
parent
48181e9a84
commit
631a71f11a
@ -50,18 +50,15 @@ if [ -z "$1" -o "${1:0:1}" = "-" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "debug 1"
|
|
||||||
# Make two temp files and send output of commands to these files
|
# Make two temp files and send output of commands to these files
|
||||||
querydump=$(mktemp)
|
querydump=$(mktemp)
|
||||||
pacman -Qs $1 > $querydump
|
pacman -Qs $1 > $querydump
|
||||||
syncdump=$(mktemp)
|
syncdump=$(mktemp)
|
||||||
pacman -Ss $1 > $syncdump
|
pacman -Ss $1 > $syncdump
|
||||||
echo "debug 2"
|
|
||||||
|
|
||||||
# Strip descriptions and 'local/' from -Qs query
|
# Strip descriptions and 'local/' from -Qs query
|
||||||
instpkg=$(mktemp)
|
instpkg=$(mktemp)
|
||||||
egrep '^[^ ]' $querydump | sed -e 's@^local/@@' > $instpkg
|
egrep '^[^ ]' $querydump | sed -e 's@^local/@@' > $instpkg
|
||||||
echo "debug 3"
|
|
||||||
|
|
||||||
# Add pkgs not in sync db, mark pkgs that are installed
|
# Add pkgs not in sync db, mark pkgs that are installed
|
||||||
cat $instpkg | while read -r pkg; do
|
cat $instpkg | while read -r pkg; do
|
||||||
@ -73,7 +70,6 @@ cat $instpkg | while read -r pkg; do
|
|||||||
sed -i "s@^\(.\+/$pkg\)@\***\1@" $syncdump
|
sed -i "s@^\(.\+/$pkg\)@\***\1@" $syncdump
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "debug 4"
|
|
||||||
# Print colorized package list and descriptions to screen
|
# Print colorized package list and descriptions to screen
|
||||||
echo -e "$(sed -r \
|
echo -e "$(sed -r \
|
||||||
-e "s@current/.*@$CLR1&$BASE@" \
|
-e "s@current/.*@$CLR1&$BASE@" \
|
||||||
@ -88,7 +84,6 @@ echo -e "$(sed -r \
|
|||||||
< $syncdump )"
|
< $syncdump )"
|
||||||
echo -en "\e[0m"
|
echo -en "\e[0m"
|
||||||
|
|
||||||
echo "debug 5"
|
|
||||||
rm $querydump
|
rm $querydump
|
||||||
rm $syncdump
|
rm $syncdump
|
||||||
rm $instpkg
|
rm $instpkg
|
||||||
|
Loading…
Reference in New Issue
Block a user