-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathsetup.sh
executable file
·95 lines (83 loc) · 1.49 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/bin/sh
set -e
sh -n "$0"
# FeedParser is used for RSS feed
# spec dependencies for Capybara & Webkit testing
RPMS=(
ruby-devel
zlib-devel
libxml2-devel
libxslt-devel
python-feedparser
redhat-rpm-config
sudo
git
)
# Sorted alpha
GEMS=(
activesupport
addressable
capybara
colorator
concurrent-ruby
em-websocket
eventmachine
ffi
forwardable-extended
http_parser.rb
i18n
jekyll
jekyll-email-protect
jekyll-git-authors
jekyll-lunr-js-search
jekyll-sass-converter
jekyll-sitemap
jekyll-watch
json
kramdown
kramdown-parser-gfm
libv8
liquid
listen
mercenary
minitest
nokogiri
pathutil
public_suffix
rack
rack-test
rb-fsevent
rb-inotify
ref
rexml
rouge
rspec
safe_yaml
sassc
terminal-table
therubyracer
thread_safe
tzinfo
unicode-display_width
zeitwerk
`tr -s ' ' < Gemfile \
| sed -e 's/^\s*//' \
| grep -E '^\s*gem ' \
| cut -d"," -f1 \
| cut -d"'" -f2 \
| grep -v '^gem '`
)
set -xe
sudo dnf install -y 'dnf-command(copr)'
sudo dnf copr enable -y 'pvalena/rubygems'
sudo dnf group install "C Development Tools and Libraries" -y
sudo dnf install -y ${RPMS[@]}
set +e
PKGS="$(echo ${GEMS[@]} | tr -s ' ' '\n' | xargs -i echo "rubygem({})")"
sudo dnf install -y --skip-broken $PKGS
rm *.lock
sed -i 's/~> />= /g' Gemfile
bundle config build.nokogiri --use-system-libraries
bundle install --local || \
bundle install
#echo ${GEMS[@]} | tr -s ' ' '\n' | sort -r | xargs -i sh -c "set -x; gem info '{}' -q | grep -q '^{} ' && exit 0; gem install '{}' --use-system-libraries && exit 0; gem install '{}' || exit 255"