dotfiles/.scripts/create-pacman-pkglist.sh
2019-08-25 00:25:43 +08:00

16 lines
264 B
Bash

#!/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