generated from electricbookworks/electric-book
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·106 lines (86 loc) · 2.73 KB
/
setup.sh
File metadata and controls
executable file
·106 lines (86 loc) · 2.73 KB
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
96
97
98
99
100
101
102
103
104
105
106
# Main dependency installation
mkdir download
cd download
sudo apt-get update && apt-get install -y \
software-properties-common \
apt-transport-https \
make \
gcc \
build-essential \
git \
wget \
libgif7 \
libpixman-1-0 \
libffi-dev \
libreadline-dev \
zlib1g-dev \
graphicsmagick \
dos2unix \
ruby-full
# Dependencies specifically for Puppeteer on unix
sudo apt-get install -y \
libasound2 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libcairo2 \
libdrm2 \
libgbm1 \
libnss3 \
libpango-1.0-0 \
libxkbcommon-x11-0 \
libxcomposite1 \
libxdamage1 \
libxfixes3 \
libxrandr2 \
curl \
git
# Install nodejs 20.x
sudo curl -k -sL https://deb.nodesource.com/setup_20.x > node_setup.sh
sudo bash node_setup.sh
sudo apt-get install nodejs -y
# Install libssl1.1
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
# Install libgif7
wget http://archive.ubuntu.com/ubuntu/pool/main/g/giflib/libgif7_5.1.2-0.2_amd64.deb
sudo dpkg -i libgif7_5.1.2-0.2_amd64.deb
# Install PrinceXML for printing to PDF
wget --no-check-certificate https://www.princexml.com/download/prince_11.4-1_ubuntu18.04_amd64.deb
sudo dpkg -i prince_11.4-1_ubuntu18.04_amd64.deb
# Install pandoc for document conversion
wget https://github.com/jgm/pandoc/releases/download/2.5/pandoc-2.5-1-amd64.deb
sudo dpkg -i ./pandoc-2.5-1-amd64.deb
# Install vscode
wget -O- https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor | sudo tee /usr/share/keyrings/vscode.gpg
echo deb [arch=amd64 signed-by=/usr/share/keyrings/vscode.gpg] https://packages.microsoft.com/repos/vscode stable main | sudo tee /etc/apt/sources.list.d/vscode.list
sudo apt update
sudo apt install code
# Install chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
# Update npm
sudo npm install -g npm@latest
# Install Gulp cli app
sudo npm install --global gulp-cli
cd ..
# Set paths for Ruby gems
echo '# Define Ruby Gems path to ~/gems' >> ~/.bashrc
echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc
echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
# Install bundler and jekyll
sudo gem install jekyll bundler
# install gems
sudo bundle install
# you might need this to resolve version conficts
#bundle update --bundler
#bundle install
#bundle update
#bundle clean --force
# Install Microsoft Core Fonts
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
sudo apt-get install ttf-mscorefonts-installer -y
# due to zscaler, disable CA check
export NODE_TLS_REJECT_UNAUTHORIZED=0
# Install local npm packages for EBW
npm i