bin/setup-gem-faves

Sat, 08 Apr 2023 18:06:43 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Sat, 08 Apr 2023 18:06:43 -0400
changeset 1104
90aa391abc44
parent 990
a4f19f325dea
permissions
-rwxr-xr-x

include needs to appear before a host match (sections actually ignore indents)

256
17a5684bfb9c Add homedir-gems
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
1 #!/bin/sh
17a5684bfb9c Add homedir-gems
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
2 set -eu
17a5684bfb9c Add homedir-gems
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
3
990
a4f19f325dea Switch to stubexec, handle user_dir install
Meredith Howard <mhoward@roomag.org>
parents: 360
diff changeset
4 if ! [ -w "$(gem env gemdir)" ]; then
a4f19f325dea Switch to stubexec, handle user_dir install
Meredith Howard <mhoward@roomag.org>
parents: 360
diff changeset
5 export GEM_HOME="$(ruby -e 'puts Gem.user_dir')"
a4f19f325dea Switch to stubexec, handle user_dir install
Meredith Howard <mhoward@roomag.org>
parents: 360
diff changeset
6 fi
a4f19f325dea Switch to stubexec, handle user_dir install
Meredith Howard <mhoward@roomag.org>
parents: 360
diff changeset
7
275
c636b6086bb2 Quieter version check, always forget lock
Meredith Howard <mhoward@roomag.org>
parents: 258
diff changeset
8 if ! bundle --version >/dev/null 2>&1; then
c636b6086bb2 Quieter version check, always forget lock
Meredith Howard <mhoward@roomag.org>
parents: 258
diff changeset
9 gem install bundler
c636b6086bb2 Quieter version check, always forget lock
Meredith Howard <mhoward@roomag.org>
parents: 258
diff changeset
10 fi
258
599c509f134c Make sure bundler is installed somehow
Meredith Howard <mhoward@roomag.org>
parents: 257
diff changeset
11
990
a4f19f325dea Switch to stubexec, handle user_dir install
Meredith Howard <mhoward@roomag.org>
parents: 360
diff changeset
12 export \
a4f19f325dea Switch to stubexec, handle user_dir install
Meredith Howard <mhoward@roomag.org>
parents: 360
diff changeset
13 BUNDLE_IGNORE_CONFIG=1 \
a4f19f325dea Switch to stubexec, handle user_dir install
Meredith Howard <mhoward@roomag.org>
parents: 360
diff changeset
14 BUNDLE_FROZEN=0
a4f19f325dea Switch to stubexec, handle user_dir install
Meredith Howard <mhoward@roomag.org>
parents: 360
diff changeset
15
a4f19f325dea Switch to stubexec, handle user_dir install
Meredith Howard <mhoward@roomag.org>
parents: 360
diff changeset
16 bundle install --jobs=2 --gemfile=~/.Gemfile
275
c636b6086bb2 Quieter version check, always forget lock
Meredith Howard <mhoward@roomag.org>
parents: 258
diff changeset
17 rm -f ~/.Gemfile.lock

mercurial