-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.sh
More file actions
executable file
·42 lines (39 loc) · 1.25 KB
/
bootstrap.sh
File metadata and controls
executable file
·42 lines (39 loc) · 1.25 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
#!/usr/bin/bash
echo "********************************************"
echo "****** bootstrap linux (also termux) *******"
echo "********************************************"
echo "The following basics will be configured:"
echo " - your device with device-name and email"
echo " - setup of device specific .devicerc"
echo " - ssh-keys"
echo " - add your devive-sshkeys to the"
echo " private gitrepo for machine setup"
echo ""
echo "This might overwrite customization that you may have done."
echo "Consecutive runs of the script are possible."
echo "However don't forget to use new shell or source your dotfiles."
read -p "Are you sure (y/n)? " -n 1 -r
if [[ $REPLY =~ ^[Yy]$ ]]
then
echo ""
if echo $PREFIX | grep -o "com.termux"; then
setup_type=termux
else
setup_type=linux
fi
if [[ $setup_type = linux ]]; then
echo ""
echo "Upgrading and installing packages ..."
sudo apt update
sudo apt upgrade
sudo apt install git vim-gtk3 ssh wget
elif [[ $setup_type = termux ]]; then
echo ""
echo "Upgrading and installing packages ..."
pkg up
pkg install git vim tree openssh wget
fi
. config-device.sh
. config-ssh.sh
. ssh-add.sh
fi