This repository was archived by the owner on Oct 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·146 lines (120 loc) · 3.65 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·146 lines (120 loc) · 3.65 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#! /bin/bash
set -eux
sudo apt-get update -qq
sudo apt-get install --yes apt-transport-https curl lsb-release software-properties-common sudo wget
DISTRO="$(lsb_release --short --id)"
DISTRO="${DISTRO,,}" # Make lowercase: e.g. Debian -> debian, Ubuntu -> ubuntu
CODENAME="$(lsb_release --short --codename)"
BASEDIST="$DISTRO"
if [[ "$BASEDIST" = "neon" ]]; then
BASEDIST="ubuntu"
fi
rm --recursive --force /tmp/setup-phanective
mkdir /tmp/setup-phanective
cd /tmp/setup-phanective
sudo apt-get remove --yes --ignore-missing \
akregator \
amarok \
dragonplayer \
fonts-droid \
fonts-horai-umefont \
fonts-takao-pgothic \
jovie \
juk \
kaddressbook \
kde-telepathy-contact-list \
kde-telepathy-text-ui \
kmag \
kmail \
kmousetool \
kmouth \
knotes \
kolourpaint4 \
kontact \
konversation \
kopete \
korganizer \
kwrite \
krdc \
ktorrent \
openjdk-7-* \
partitionmanager \
xterm
if [[ "${DISTRO}" == "debian" ]]; then
sudo apt-get remove --yes --ignore-missing \
kde-full \
kde-standard \
kdeplasma-addons \
plasma-scriptengine-superkaramba \
plasma-widget-lancelot
fi
sudo apt-get autoremove --yes
sudo apt-get dist-upgrade --yes
# Add Node.js Repo
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
# Add VirtualBox Repo
echo "deb http://download.virtualbox.org/virtualbox/debian $CODENAME contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
# Add Hashicorp Repo
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
sudo apt-get update -qq
# Install from deb files
curl --silent --show-error --output /tmp/setup-phanective/docker-desktop.deb --location "https://desktop.docker.com/linux/main/amd64/docker-desktop-4.9.0-amd64.deb"
curl --silent --show-error --output /tmp/setup-phanective/dropbox.deb --location "https://www.dropbox.com/download?dl=packages/$BASEDIST/dropbox_2019.02.14_amd64.deb"
curl --silent --show-error --output /tmp/setup-phanective/vscode.deb --location "https://go.microsoft.com/fwlink/?LinkID=760868"
# Ignore error that dependencies are not installed
set +eu
sudo dpkg --install \
/tmp/setup-phanective/docker-desktop.deb \
/tmp/setup-phanective/dropbox.deb \
/tmp/setup-phanective/vscode.deb
set -eux
sudo apt-get --fix-broken install --yes
sudo apt-get install --yes --no-install-recommends --ignore-missing \
apt-transport-https \
build-essential \
clamav \
curl \
git \
fcitx \
fcitx-mozc \
firefox \
fonts-vlgothic \
kde-config-fcitx \
kolourpaint \
nodejs \
openssh-client \
snapd \
sudo \
uvccapture guvcview \
vagrant \
virtualbox-6.1 \
vlc \
wget \
whois \
yakuake
if [[ "$BASEDIST" = "debian" ]]; then
snap install firefox
fi
# Dropbox proprietary daemon installation
(cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -)
dropbox autostart y
# Allow Dropbox to watch more number of files
echo "fs.inotify.max_user_watches = 100000" | sudo tee /etc/sysctl.d/dropbox.conf
# Vagrant plugins
vagrant plugin install vagrant-vbguest
sudo npm update --global
#
# git config
#
# Don't convert line endings to CRLF
git config --global core.autocrlf false
# Don't commit file permission change
git config --global core.fileMode false
git config --global user.name "Jumpei Ogawa"
# git config --global user.email "phanect@example.com" # Do it manually
if [[ ! -f ~/.ssh/id_rsa ]]; then
ssh-keygen -t ed25519 -f ~/.ssh/id_rsa -N ""
fi
rm --recursive --force /tmp/setup-phanective