From ae147b1577302c5f2a9a271bcedf85655d150b02 Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Sat, 17 Sep 2022 22:44:44 -0500 Subject: [PATCH] Bug fix --- makepkglist_server | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 makepkglist_server diff --git a/makepkglist_server b/makepkglist_server new file mode 100644 index 0000000..1b5d727 --- /dev/null +++ b/makepkglist_server @@ -0,0 +1,23 @@ +#!/bin/sh + +# this script lists all packages installed in my system and saves them +# such that it's easy to install packages in case of a system reset + +# this is the server version + +# define location for output +DIR=/mnt/storage/Documents/Backup/pkglists_server + +# make sure that the folder exists +mkdir -p $DIR + +# list and save system packages +# command -v pacman &> /dev/null && pacman -Qq > $DIR/pacman +command -v dnf &> /dev/null && dnf list installed > $DIR/dnf + +# 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 +