bin/homedir-setup

Mon, 20 Jan 2025 02:47:08 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Mon, 20 Jan 2025 02:47:08 -0500
changeset 1181
7eef65340481
parent 1180
308dce5084af
permissions
-rwxr-xr-x

fix arch check

964
72a7a0ffbce8 retire plenv for asdf
Meredith Howard <mhoward@roomag.org>
parents: 850
diff changeset
1 #!/bin/bash
72a7a0ffbce8 retire plenv for asdf
Meredith Howard <mhoward@roomag.org>
parents: 850
diff changeset
2 set -euo pipefail
245
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
3
969
28111ba4e573 move to util lib
Meredith Howard <mhoward@roomag.org>
parents: 967
diff changeset
4 source .lib/sh/util.sh
245
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
5
967
9314317ed18f clean up
Meredith Howard <mhoward@roomag.org>
parents: 966
diff changeset
6 [ -f .zshrc ] ||
9314317ed18f clean up
Meredith Howard <mhoward@roomag.org>
parents: 966
diff changeset
7 die "Refusing to run without a .zshrc nearby"
9314317ed18f clean up
Meredith Howard <mhoward@roomag.org>
parents: 966
diff changeset
8
9314317ed18f clean up
Meredith Howard <mhoward@roomag.org>
parents: 966
diff changeset
9 git --version >/dev/null ||
9314317ed18f clean up
Meredith Howard <mhoward@roomag.org>
parents: 966
diff changeset
10 die "Please install git!"
9314317ed18f clean up
Meredith Howard <mhoward@roomag.org>
parents: 966
diff changeset
11
849
9a6cb845e239 Switch to perl-install and simplify clone or pull
Meredith Howard <mhoward@roomag.org>
parents: 760
diff changeset
12 clone_or_pull 'https://github.com/tarjoilija/zgen.git' .zgen
9a6cb845e239 Switch to perl-install and simplify clone or pull
Meredith Howard <mhoward@roomag.org>
parents: 760
diff changeset
13
9a6cb845e239 Switch to perl-install and simplify clone or pull
Meredith Howard <mhoward@roomag.org>
parents: 760
diff changeset
14 zsh -i -c 'zgen update' || :
245
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
15
965
f1e5d30543ba forget the minimal setup mode
Meredith Howard <mhoward@roomag.org>
parents: 964
diff changeset
16 clone_or_pull 'https://github.com/asdf-vm/asdf' .asdf
f1e5d30543ba forget the minimal setup mode
Meredith Howard <mhoward@roomag.org>
parents: 964
diff changeset
17 source .asdf/asdf.sh
245
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
18
999
f7bbd67b1aac switch off of asdf-perl fork
Meredith Howard <mhoward@roomag.org>
parents: 971
diff changeset
19 [ -d .asdf/plugins/perl ] ||
f7bbd67b1aac switch off of asdf-perl fork
Meredith Howard <mhoward@roomag.org>
parents: 971
diff changeset
20 asdf plugin add perl
f7bbd67b1aac switch off of asdf-perl fork
Meredith Howard <mhoward@roomag.org>
parents: 971
diff changeset
21
965
f1e5d30543ba forget the minimal setup mode
Meredith Howard <mhoward@roomag.org>
parents: 964
diff changeset
22 asdf plugin update --all
756
8bc91181db9d add setup-man
Meredith Howard <mhoward@roomag.org>
parents: 534
diff changeset
23
1181
7eef65340481 fix arch check
Meredith Howard <mhoward@roomag.org>
parents: 1180
diff changeset
24 if [[ "$MACHTYPE" == "i686" ]]; then
1180
308dce5084af start switching to mise-en-place
Meredith Howard <mhoward@roomag.org>
parents: 999
diff changeset
25 curl -sS 'https://mise.run/' | sh
308dce5084af start switching to mise-en-place
Meredith Howard <mhoward@roomag.org>
parents: 999
diff changeset
26 fi
308dce5084af start switching to mise-en-place
Meredith Howard <mhoward@roomag.org>
parents: 999
diff changeset
27
965
f1e5d30543ba forget the minimal setup mode
Meredith Howard <mhoward@roomag.org>
parents: 964
diff changeset
28 bin/setup-man || :
381
b09db2db7f84 use ruby and nodejs plugins for asdf
Meredith Howard <mhoward@roomag.org>
parents: 328
diff changeset
29
459
efa21f0b1dca Remove rbenv & ndenv transition stuff
Meredith Howard <mhoward@roomag.org>
parents: 383
diff changeset
30 # Get rid of older stuff
964
72a7a0ffbce8 retire plenv for asdf
Meredith Howard <mhoward@roomag.org>
parents: 850
diff changeset
31 for OLD in .plenv .rbenv .ndenv; do
849
9a6cb845e239 Switch to perl-install and simplify clone or pull
Meredith Howard <mhoward@roomag.org>
parents: 760
diff changeset
32 if [ -e $OLD ]; then
967
9314317ed18f clean up
Meredith Howard <mhoward@roomag.org>
parents: 966
diff changeset
33 warn "Pruning $OLD"
849
9a6cb845e239 Switch to perl-install and simplify clone or pull
Meredith Howard <mhoward@roomag.org>
parents: 760
diff changeset
34 rm -rf $OLD
9a6cb845e239 Switch to perl-install and simplify clone or pull
Meredith Howard <mhoward@roomag.org>
parents: 760
diff changeset
35 fi
9a6cb845e239 Switch to perl-install and simplify clone or pull
Meredith Howard <mhoward@roomag.org>
parents: 760
diff changeset
36 done

mercurial