Created
January 14, 2019 23:59
-
-
Save savolla/671b77ba7c815b20020ccb4fafbcd778 to your computer and use it in GitHub Desktop.
installed programs tracker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# pacman -S program --> this is gonna push 'program' into installed-programs.txt | |
if [ $1=="-S" ]; then | |
echo $2 >> installed-programs.txt | |
fi | |
# pacman -R program --> this is gonna remove the 'program' from installed-programs.txt | |
if [ $1=="-R" ]; then | |
echo $(cat installed-programs.txt | grep -v "^$2$") > installed-programs.txt | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment