-
Notifications
You must be signed in to change notification settings - Fork 12
/
mus.sh
executable file
·55 lines (38 loc) · 2.38 KB
/
mus.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
#!/bin/bash
# Decription
# ----------
# Setups MUS (Minimal Usable System). Targets very slow machines with very broken disks and very bad internet, so checks everything.
# Author: [Dmitry](http://dmi3.net) [Source](https://github.com/dmi3/bin)
# Usage
# -----
# /usr/bin/GET https://raw.githubusercontent.com/dmi3/bin/master/mus.sh > ~/mus.sh && chmod +x ~/mus.sh && ~/mus.sh
#SIZE=wget --spider https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-10.0.0-amd64-lxde.iso 2>&1 | grep Length | cut -d ' ' -f 2
#SIZE=stat -c '%s' imagename.iso
SIZE=2986344448
#MD5SUM=curl -s https://cdimage.debian.org/debian-cd/current-live/amd64/bt-hybrid/MD5SUMS | grep lxde.iso | cut -d ' ' -f 1
#MD5SUME="bd025c7ac8556055d7766be8cab5b479 -"
#MD5SUM=curl -s https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/10.8.0-live+nonfree/amd64/iso-hybrid/MD5SUMS | grep lxde+nonfree.iso | cut -d ' ' -f 1
MD5SUME="a1eb37782ef6f3537132a80c49b91d93 -"
#lsblk | grep RM=1
echo "Checking image md5sum"
MD5SUMA=$(sudo head -c $SIZE /dev/sr0 | md5sum)
test "$MD5SUME" = "$MD5SUMA" && echo "ok" || echo "Not ok. Expected '$MD5SUME' Got '$MD5SUMA'"
read -p "Continue? (or Ctrl+C)"
sudo apt-get update
sudo apt-get install curl wget bash-completion firefox-esr encfs keepassxc
sudo apt-get install hplip
killall clipit
wget -q --show-progress https://raw.githubusercontent.com/dmi3/bin/master/config/clipit/clipitrc -O ~/.config/clipit/clipitrc
nohup clipit&
#wget -q --show-progress https://github.com/keepassxreboot/keepassxc/releases/download/2.4.3/KeePassXC-2.4.3-x86_64.AppImage
#wget -q --show-progress https://github.com/keepassxreboot/keepassxc/releases/download/2.4.3/KeePassXC-2.4.3-x86_64.AppImage.DIGEST -O ->> /tmp/SHASUMS
#chmod +x KeePassXC-*-x86_64.AppImage
wget -q --show-progress https://raw.githubusercontent.com/dmi3/bin/master/config/lxterminal/lxterminal.conf -O ~/.config/lxterminal/lxterminal.conf
wget -q --show-progress https://raw.githubusercontent.com/dmi3/bin/master/aliases.bash -O ~/aliases.bash
wget -q --show-progress https://raw.githubusercontent.com/dmi3/bin/master/layoutset -O ~/layoutset
wget -q --show-progress https://raw.githubusercontent.com/dmi3/bin/master/MD5SUMS -O /tmp/SHASUMS
sha256sum -c --ignore-missing /tmp/SHASUMS
read -p "Continue? (or Ctrl+C)"
echo "source ~/aliases.bash" >> ~/.bashrc
~/layoutset
echo "You can restart terminal now"