mirror of
https://github.com/SinTan1729/random.git
synced 2024-12-26 21:18:36 -06:00
Add makepkglist
This commit is contained in:
parent
9298255135
commit
fea88fe447
1 changed files with 18 additions and 0 deletions
18
makepkglist
Normal file
18
makepkglist
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# define location for output
|
||||||
|
DIR=/home/sintan/Documents/Backup/pkglists
|
||||||
|
|
||||||
|
# make sure that the folder exists
|
||||||
|
mkdir -p $DIR
|
||||||
|
|
||||||
|
# list and save system packages
|
||||||
|
command -v pacman &> /dev/null && pacman -Qq > $DIR/pacman
|
||||||
|
|
||||||
|
# list and save pip packages
|
||||||
|
command -v pip &> /dev/null && pip list | awk '{print $1}' | tail -n +3 > $DIR/pip
|
||||||
|
|
||||||
|
# list and save pipx packages
|
||||||
|
command -v pipx &> /dev/null && pipx list | grep package | awk '{print $2}' > $DIR/pipx
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue