From 3bf8c5b761c1250306931080cf9f45ae360a59dd Mon Sep 17 00:00:00 2001 From: foo-dogsquared Date: Sun, 25 Aug 2019 00:25:43 +0800 Subject: [PATCH] Create a package list update script --- .scripts/create-pacman-pkglist.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .scripts/create-pacman-pkglist.sh diff --git a/.scripts/create-pacman-pkglist.sh b/.scripts/create-pacman-pkglist.sh new file mode 100644 index 0000000..b2b18af --- /dev/null +++ b/.scripts/create-pacman-pkglist.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# Simply creates a package list at $HOME as `pkglist.txt` + +pkglist=$(pacman -Qqne) +pkglist_filepath="$HOME/pkglist.txt" + +if [[ -f $pkglist_filepath ]]; then + rm "$pkglist_filepath" +fi + +touch $pkglist_filepath + +echo "$pkglist" >> $pkglist_filepath +