work in progress
This commit is contained in:
parent
2f58f64fac
commit
534c96ccf4
19
fpf
19
fpf
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
|
|
||||||
### Set up package lists
|
### Set up package lists
|
||||||
pacman -Slq >/dev/null 2>&1 /tmp/packages
|
pacman -Slq | sort > /tmp/packages
|
||||||
|
|
||||||
### Help
|
### Help
|
||||||
Help() {
|
Help() {
|
||||||
|
@ -24,9 +24,20 @@ Help() {
|
||||||
|
|
||||||
# Test for AUR option, if not run with pacman
|
# Test for AUR option, if not run with pacman
|
||||||
if [[ -z "$1" ]]; then
|
if [[ -z "$1" ]]; then
|
||||||
pacman -Qq > /tmp/local_packages
|
echo "Setting things up..."
|
||||||
cat /tmp/packages /tmp/local_packages | sort | uniq > /tmp/all_packages
|
# echo -e "$(pacman -Qqe)\n" > /tmp/local_packages
|
||||||
cat /tmp/all_packages |fzf -e -m --preview 'cat <(pacman -Si {1}) <(pacman -Fl {1} | awk "{print \$2}")' --layout=reverse --prompt='Select packages to install (use TAB to toggle selection) >' | xargs -ro -n1 sudo pacman -S
|
# counter=1
|
||||||
|
# while IFS= read -r line; do
|
||||||
|
# sed -i -e '/$line/ s/.*/"$line" */g' /tmp/packages
|
||||||
|
# counter=$((counter+1))
|
||||||
|
# done < /tmp/local_packages
|
||||||
|
mapfile -t local_pkgs < <(pacman -Qqe)
|
||||||
|
for line in "${local_pkgs[@]}"; do
|
||||||
|
sed -i "s/${line}/${line} */" /tmp/packages
|
||||||
|
done
|
||||||
|
unset local_pkgs
|
||||||
|
cat /tmp/packages |fzf -e -m --preview 'cat <(pacman -Si {1}) <(pacman -Fl {1} | awk "{print \$2}")' --layout=reverse --prompt='Select packages to install (use TAB to toggle selection) >' | xargs -ro -n1 sudo pacman -S
|
||||||
|
clear
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while getopts ":yh" option; do
|
while getopts ":yh" option; do
|
||||||
|
|
Loading…
Reference in New Issue