From fea88fe447424f52186d13dda0d3a47b921dfc8e Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Wed, 15 Jun 2022 01:31:28 -0500 Subject: [PATCH] Add makepkglist --- makepkglist | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 makepkglist diff --git a/makepkglist b/makepkglist new file mode 100644 index 0000000..b8a7278 --- /dev/null +++ b/makepkglist @@ -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 + +