Update 2 files

- /home/private_dot_config/shell/aliases.sh.tmpl
- /home/dot_local/bin/executable_install-program
This commit is contained in:
Brian Zalewski 2023-01-04 03:14:29 +00:00
parent d47e641b39
commit bf42f5ce85
2 changed files with 8 additions and 2 deletions

View file

@ -1021,7 +1021,13 @@ async function installPackageList(packageManager, packages) {
} else if (packageManager === 'apt') {
for (let pkg of packages) {
try {
await $`sudo apt-get install -y ${pkg}`
try {
log('info', 'apt-get Installation', `Checking if ${pkg} is already installed`)
await $`dpkg -l ${pkg} | grep -E '^ii' > /dev/null`
} catch (e) {
log('info', 'apt-get Installation', `Installing ${pkg} since it is not already present on the system`)
await $`sudo apt-get install -y ${pkg}`
}
} catch (e) {
log('error', 'apt-get Failure', `There was an error installing ${pkg} with apt-get`)
}

View file

@ -81,7 +81,7 @@ fi
### ripgrep
if command -v rg &> /dev/null; then
alias grep='rg --color=auto'
alias rgrep='rg --color=auto'
fi
### supdock