From 45426817de798da20cdc0ac2377086c265c0025a Mon Sep 17 00:00:00 2001 From: Andrejus Date: Mon, 13 Jul 2020 15:17:29 +0100 Subject: [PATCH] Bootstrap and install improvements --- bootstrap.pl | 11 +++++++---- files/.config/fish/config.fish | 2 +- install/00-apt-pkglist | 1 + install/utils.sh | 1 + 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/bootstrap.pl b/bootstrap.pl index a5bd2cd..6813a0a 100755 --- a/bootstrap.pl +++ b/bootstrap.pl @@ -4,6 +4,7 @@ use warnings; use autodie; use Cwd; +use Data::Dumper; use Stow; @@ -12,12 +13,14 @@ my $target = $ENV{'HOME'}; print "Stowing $dir/files to $target\n"; my %stow_options = ( dir => $dir, - target => $target); + target => $target ); my $stow = new Stow(%stow_options); my @pkgs = ('files'); $stow->plan_stow(@pkgs); - +my %conflicts = $stow->get_conflicts; +if (%conflicts) { + my $dump = Dumper(%conflicts); + die("Failed to stow, conflicts: $dump"); +} $stow->process_tasks(); -print "done\n"; - diff --git a/files/.config/fish/config.fish b/files/.config/fish/config.fish index d31b738..7b6440e 100644 --- a/files/.config/fish/config.fish +++ b/files/.config/fish/config.fish @@ -1,7 +1,7 @@ # ---------------------------------------------------------------------------- # # Cross-shell (only import if environment has been setup) # ---------------------------------------------------------------------------- # -if test -e ~/.profile +if begin; test -e ~/.profile; and type -q bass; end bass source ~/.profile end diff --git a/install/00-apt-pkglist b/install/00-apt-pkglist index a9dfe65..6cd645b 100644 --- a/install/00-apt-pkglist +++ b/install/00-apt-pkglist @@ -1,4 +1,5 @@ curl +git make neovim net-tools diff --git a/install/utils.sh b/install/utils.sh index bcfb57b..d746e0d 100755 --- a/install/utils.sh +++ b/install/utils.sh @@ -18,6 +18,7 @@ upgrade() { -o Dpkg::Options::="--force-confold" \ -y \ dist-upgrade + sudo apt-get -y autoremove } # @arg $1 packages to install