update to .dot-files-laptop
This commit is contained in:
parent
ba1a306817
commit
24b6464d0b
46 changed files with 3332 additions and 0 deletions
20
.dot-files-laptop/.bin/sh/orphans.sh
Executable file
20
.dot-files-laptop/.bin/sh/orphans.sh
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Check for orphans then asks for removal
|
||||
|
||||
{
|
||||
while [[ $(pacman -Qtdq) ]];
|
||||
do
|
||||
pacman -Qtdq;
|
||||
read -p "Remove orphaned packages? [y/n]:" -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||
then
|
||||
sudo pacman -R $(pacman -Qtdq)
|
||||
elif [[ -n $(pacman -Qtdq) ]];
|
||||
then
|
||||
exit
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue