-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinit.sh
executable file
·60 lines (48 loc) · 1.79 KB
/
init.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
#!/usr/bin/env bash
set -e # This setting is telling the script to exit on a command error.
if [[ "$1" == "-v" ]]; then
set -x # You refer to a noisy script.(Used to debugging)
shift
fi
if [ "$(whoami)" != "root" ]; then
SUDO=sudo
fi
# """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
# Maintainer :- vallabhdas kansagara<vrkansagara@gmail.com> — @vrkansagara
# Note :- Init script
# """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
${SUDO} apt-get clean
${SUDO} apt-get autoremove
${SUDO} apt-get update
${SUDO} apt-get upgrade -V
${SUDO} apt install -y git gitk htop nmap elinks arandr gufw ufw zsh curl
${SUDO} apt install -y xdotool
${SUDO} apt install -y guake
# Install zsh and set default shell to zsh
if [ ! -d "$HOME/.oh-my-zsh" ]; then
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
chsh -s $(which zsh)
fi
mkdir -p $HOME/www $HOME/git/vrkansagara $HOME/Applications
if [ ! -d "$HOME/Applications/PhpStorm-213.7172.28/" ]; then
curl https://download-cdn.jetbrains.com/webide/PhpStorm-2021.3.3.tar.gz -o PhpStorm-2021.3.3.tar.gz
cd $HOME/Applications
tar -xvf PhpStorm-2021.3.3.tar.gz
fi
if [ ! -f "$HOME/.vim/bin/jq" ]; then
cd /tmp
${SUDO} rm -rf /tmp/jq $(pwd)/bin/jq
wget https://github.com/stedolan/jq/releases/latest/download/jq-linux64 -O jq
chmod +x /tmp/jq
echo '{"foo": 0}' | /tmp/jq .
mv /tmp/jq $(pwd)/bin
fi
if [ ! -f "$HOME/.vim/bin/JMESPath" ]; then
cd /tmp
${SUDO} rm -rf /tmp/JMESPath $(pwd)/bin/JMESPath
wget https://github.com/jmespath/jp/releases/latest/download/jp-linux-amd64 -O JMESPath
chmod +x /tmp/JMESPath
echo '{"a": "foo", "b": "bar", "c": "baz"}' | /tmp/JMESPath a
mv /tmp/JMESPath $(pwd)/bin
fi
${SUDO} chmod +x $HOME/.vim/bin/*