From 38e8b29eecf9e5d2a69119f0402d83291729d810 Mon Sep 17 00:00:00 2001 From: Salt Date: Thu, 6 Jun 2019 16:59:38 -0500 Subject: [PATCH] Add some basic package installation --- build-home.sh | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/build-home.sh b/build-home.sh index 6215ece..8165731 100755 --- a/build-home.sh +++ b/build-home.sh @@ -53,12 +53,16 @@ step_validate_logs() { step_validate_deps() { # Ensure we have the proper dependencies log "Validating dependencies" + local nodeps=0 for dep in $deps; do if ! validatedep "$dep"; then log "Could not find critical dependency \"$dep\"" 2 - return 1 + nodeps=1 fi done + if [ "$nodeps" == "1" ]; then + return 1 + fi } step_make_skeleton() { # Build Home folder skeleton @@ -97,6 +101,27 @@ step_dot_update() { git --git-dir="$gitdir" --work-tree="$bootstrapdir" config status.showUntrackedFiles no >> "$logfile" } >> "$logfile" 2>&1 } +step_deb_install() { + ( + source "/etc/os-release" || exit 1 + [ "$ID" == "debian" ] || exit 1 + ) || return 1 + log "Installing required Debian packages" + log "You will be prompted to elevate privileges" + if ! sudo echo "Privileges elevated"; then + log "Permissions elevation failed" + return 2 + fi + [ "$(uname -m)" == "x86_64" ] && sudo dpkg --add-architecture i386 + sudo apt update + sudo apt dist-upgrade -y + sudo apt install -y \ + arc-theme breeze-cursor-theme conky curl dunst firefox-esr liferea lightdm mate preload rofi syncthing-gtk thunderbird tint2 virt-manager + [ "$(uname -m)" == "x86_64" ] && sudo apt install -y \ + steam + sudo apt purge -y \ + mate-notification-daemon +} ## Main main() { @@ -160,6 +185,7 @@ main() { step_repo_clone || exit $? step_repo_move || exit $? step_dot_update || exit $? + step_deb_install log "Dotfiles set up successfully" exit 0 }