mirror of
https://github.com/correl/dotfiles.git
synced 2024-11-16 19:19:28 +00:00
16 lines
334 B
Text
16 lines
334 B
Text
|
#!/bin/bash
|
||
|
|
||
|
if [ -z "$__apt_updated" ]; then
|
||
|
_run "Update APT cache" sudo apt-get update
|
||
|
__apt_updated=yes
|
||
|
fi
|
||
|
|
||
|
function _apt {
|
||
|
local pkg=$1
|
||
|
if ! dpkg -s $pkg >/dev/null 2>&1; then
|
||
|
_run "[apt] Install $pkg" sudo apt-get install -y $1
|
||
|
else
|
||
|
echo "[apt] $pkg is already installed, skipping."
|
||
|
fi
|
||
|
}
|