-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvm_setup.sh
49 lines (35 loc) · 1.11 KB
/
vm_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
#!/bin/bash
# Author: metiu07
# Date : 17.6.2017
# What this script does:
# 1. Updates everything currently in VM
# 2. Checks if VM is 64bit
# 2a. If true enables multilib
# 3. Dowload "bare minimum" packages
# 4a/b. Enables chosen repository
SCRIPT_SHA1SUM=34b1a3698a4c971807fb1fe41463b9d25e1a4a09
# This script is supposed to run without user interaction
PACMAN_FLAGS=--noconfirm
# Uncomment locale in /etc/locale.gen
# Run sudo locale-gen
# 1.
sudo pacman $PACMAN_FLAGS -Sy
# 2.
BITS=$(uname -m)
# 2a.
if [ $BITS == "x86_64" ]; then
echo "Enabling multilib"
# There can be done some fancy uncommenting things with sed
sudo echo -e "[multilib]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf
# Upgrade sytem
sudo pacman -Sy
fi
# 3.
sudo pacman $PACMAN_FLAGS -S base-devel tmux screen vim emacs-nox git
# 4a.
echo "Installign BlackArch Repo"
# VMs dont matter, right?
curl https://blackarch.org/strap.sh -o /tmp/strap.sh && sudo sh /tmp/strap.sh
# 4b.
# echo "Installing Arch Strike Repo"
# sudo echo -e "[archstrike]\nServer = https://mirror.archstrike.org/$arch/$repo" >> /etc/pacman.conf