From 7e0d5440d858238e0eca81b2193224ab77955caa Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 30 Dec 2019 10:20:17 +0100 Subject: [PATCH] Add basic bootstrap routine --- .../.config/bootstrap/autostow.sh | 8 +-- .../{install => install_packages.sh} | 11 ++-- bootstrap/.config/bootstrap/packages.csv | 24 +++---- install.sh | 66 +++++++++++++++++++ 4 files changed, 86 insertions(+), 23 deletions(-) rename autostow.sh => bootstrap/.config/bootstrap/autostow.sh (79%) rename bootstrap/.config/bootstrap/{install => install_packages.sh} (90%) create mode 100755 install.sh diff --git a/autostow.sh b/bootstrap/.config/bootstrap/autostow.sh similarity index 79% rename from autostow.sh rename to bootstrap/.config/bootstrap/autostow.sh index c5debc3..fbc9746 100755 --- a/autostow.sh +++ b/bootstrap/.config/bootstrap/autostow.sh @@ -50,16 +50,16 @@ main() { case "$1" in -s | --stow) have_stow - printf "Creating dotfile symlinks ........................\n" + echo "Creating dotfile symlinks ................................................." stow_dirs - printf "Done creating symlinks ...........................\n" + echo "Done creating symlinks ...................................................." exit 0 ;; -d | --delete) have_stow - printf "Removing dotfile symlinks ........................\n" + echo "Removing dotfile symlinks ................................................." unstow_dirs - printf "Done removing symlinks ...........................\n" + echo "Done removing symlinks ...................................................." exit 0 ;; -h | --help | *) diff --git a/bootstrap/.config/bootstrap/install b/bootstrap/.config/bootstrap/install_packages.sh similarity index 90% rename from bootstrap/.config/bootstrap/install rename to bootstrap/.config/bootstrap/install_packages.sh index 5bf818f..33ba4bd 100755 --- a/bootstrap/.config/bootstrap/install +++ b/bootstrap/.config/bootstrap/install_packages.sh @@ -7,13 +7,15 @@ # DESCRIPTION: Display usage information for this script. # PARAMETERS: see usage function #============================================================================== +packages="${BOOTSTRAP_PACKAGES:-packages.csv}" + main() { local cmd="" local ret=0 case "$1" in -v | --version) - printf "Package bootstrap script.\n\n©Marty Oehme\n\nVersion: 0.1\n" + printf "Package bootstrap script.\n\n©Marty Oehme\n\nVersion: 0.3\n" ;; -h | --help) printf "Usage: install [-f|--force][-v|--version][-h|--help]\n\n-f Do not ask for any confirmations but force update and installation.\n" @@ -58,9 +60,9 @@ update_repos() { install_packages() { unattended="$1" if "$unattended"; then - yay -Squ --noconfirm --needed -